MCP Write tools
complete
Tim Gaweco
marked this post as
complete
M
Majdi BO
We've been experimenting with building a semantic MCP layer on top of IcePanel's API and wanted to share some early learnings that might be useful as you design the write tools.
The biggest shift for us was thinking in agent tasks rather than API endpoints, this optimize tool calls and reduce the feedback loop needed and latency.
Example of naive write approach (API-shaped): To add a new service, the agent calls listObjects to check for duplicates, listDomains to resolve the domain name to an ID, then createModelObject with the raw payload. That's 3 round-trips, the agent has to carry all the context between them, and if any step is ambiguous it stalls and asks the user.
Example of semantic write approach (task-shaped): A single create_object tool accepts a name, a domain name, and a C4 type. It resolves the domain, checks for duplicates, and writes (all internally). The prompt is "add a Redis cache to the Order service" and it works in one shot.
A few principles that helped us on the write side:
- Accept names, not IDs : agents work with language; internal fuzzy resolution removes a whole disambiguation loop before every write.
- Compose on the server side : pre-flight checks (dedup, existence validation) inside the tool save the agent 2–3 turns of error recovery.
- Encode guard rails in the tool : connect_objects validating that both objects exist before writing beats the agent discovering a 404 mid-task.
- Deprecate-first for deletes : defaulting to status: deprecated instead of hard delete is a much safer contract for an agent that can't easily undo things.
Really glad to see this moving forward, hope some of this is useful input for the MCP Write tools design!
Derrick Persson
Majdi BO: These are great insights, thank you for sharing!
Tim Gaweco
marked this post as
in progress
Tim Gaweco
marked this post as
planned