Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| const url = `${API_BASE_URL}${path}`; | ||
|
|
||
| const headers = { | ||
| Accept: "application/json", |
There was a problem hiding this comment.
Text export uses wrong Accept header for CSV
Medium Severity
The apiRequestText function sets Accept: "application/json" header but is used for endpoints returning non-JSON content (CSV, plain text, mermaid diagrams). This tells the API server the client prefers JSON responses, which could cause content negotiation issues if the server respects the Accept header. The endpoints getModelObjectsCsv, getModelConnectionsCsv, getFlowText, getFlowCode, and getFlowMermaid all rely on this function expecting text/csv or plain text responses.
I added the CSV and dependency export reads so model object data can be pulled in bulk.
What I changed
Why I did it
Notes
Test plan
Note
Medium Risk
Adds a new IcePanel API client with retries/timeouts and introduces MCP tools that can create/update/delete model objects, which increases blast radius if misused or misconfigured. Primary risk is correctness of request/response typing and error handling around external API calls (including destructive deletes).
Overview
Introduces a new
src/services/icepanel-client.tsIcePanel API client with validated base URL config, API key enforcement, request timeouts, GET retry/backoff, and a structuredIcePanelApiError+handleApiErrormapping.Expands IcePanel surface area beyond basic reads by adding read endpoints (including model object CSV export and model object dependencies JSON export) plus additional resources (connections CSV, tags/tag-groups, domains, diagrams/flows and exports) and write operations for model objects, connections, tags, and domains.
Adds
src/tools/model-objects.tsMCP tools for listing/searching model objects, fetching details/connections, exporting CSV and dependency JSON, and performing CRUD (create/update/delete) with zod validation and formatted outputs.Updates
src/types.tsto broaden model objectstatus/typeunions and add request/response types for the new endpoints and write operations.Written by Cursor Bugbot for commit 34c5c74. This will update automatically on new commits. Configure here.
Recommended merge order