Skip to content

feat: add IcePanel write tools#22

Open
AlexanderNZ wants to merge 3 commits intoIcePanel:mainfrom
AlexanderNZ:pr/write-tools
Open

feat: add IcePanel write tools#22
AlexanderNZ wants to merge 3 commits intoIcePanel:mainfrom
AlexanderNZ:pr/write-tools

Conversation

@AlexanderNZ
Copy link
Contributor

@AlexanderNZ AlexanderNZ commented Jan 29, 2026

This adds the write side of the MCP tools so the client can manage IcePanel data, not just read it.

What I changed

  • added create/update/delete tools for model objects, connections, tags, and domains
  • tightened validation and error handling in the IcePanel client
  • kept read tools consistent with the new error format

Why I did it

  • I needed parity with the read tools for real workflows
  • the improved errors make it easier to debug auth and API issues

Test plan

  • not run

Recommended merge order

Add CRUD operations for model objects following Anthropic mcp-builder
skill guidelines:

Tools added:
- icepanel_create_model_object: Create new C4 elements
- icepanel_update_model_object: Update existing elements
- icepanel_delete_model_object: Delete elements (with warning)

Implementation details:
- IcePanelApiError class for structured error handling
- handleApiError() with actionable messages per HTTP status
- CreateModelObjectRequest/UpdateModelObjectRequest types
- Comprehensive tool descriptions with Args/Returns/Examples

Per mcp-builder best practices:
- snake_case tool names with service prefix
- Clear destructive operation warnings
- Error messages guide users toward solutions
Bug fixes:
- Fix ModelObject.status type: was single literal 'deprecated', now union
- Fix ModelObject.type type: was single literal 'actor', now union
- Add ModelConnectionResponse type for single connection responses
- Add return type to getConnection() function
- Add isError: true to all read tool error handlers for MCP compliance

These fixes ensure proper TypeScript type checking and consistent
error handling per MCP specification.
Add CRUD operations for:
- Model objects (create, update, delete)
- Connections (create, update, delete)
- Teams (create, update, delete)
- Tags (create, update, delete)
- Domains (create, update, delete)

All tools follow Anthropic mcp-builder skill guidelines:
- snake_case naming with icepanel_ prefix
- Proper error handling with actionable messages
- isError: true on failures for MCP compliance

Bug fixes included:
- Fixed ModelObject.status/type union types
- Added ModelConnectionResponse type
- Added isError: true to all read tool error handlers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant