90 MCP tools: what I got wrong

A week ago I wrote about giving my browser CAD an MCP server. The short version: KontrCAD keeps a project as a list of operations, so an assistant that can call create_primitive, extrude or boolean_subtract builds the same parametric model a human would — and you can still edit every number afterwards.
That article was about architecture. This one is about the boring part everybody hits around tool forty: how to stop drowning in your own tool list.
The server now exposes 90 tools. Here is what I got wrong on the way, and what fixed it.
Mistake 1: sending every schema on every request
First version: all tools, all schemas, every turn. That is roughly 15k tokens of JSON describing tools the model will not touch — paid on every message, and worse, it makes the model worse at picking. Too many similar names, and it starts inventing combinations.
The fix was groups. Nine of them, plus three meta-tools, and a rule: the session starts with core only — 15 tools — and the assistant opens what it needs with enable_tool_group.
The interesting part is not the grouping but who decides. I tried making the client pre-select groups and it was always wrong. Letting the model call list_tool_groups and then enable_tool_group works better, because the model knows what it is about to do.
Mistake 2: making the model verify its own work
For a while the loop looked like: create a box → call a "measure" tool → compare → fix. Three calls where one should do, and the comparison was usually sloppier than the geometry.
Now tools accept expect: a bounding box and a volume the caller believes are correct. If the result is outside tolerance, the tool returns an error instead of success. The model gets the same information one call earlier, and it can't quietly skip the check.
This is the single change that cut the most useless turns.
Mistake 3: one operation per call
Boolean, then fillet, then a hole, then another fillet — four round trips, four chances to lose the thread, and if the third fails you have a half-modified scene.
batch takes an array of operations and executes them in order. With rollback: true, a failure anywhere restores the scene to the state before the batch. The model then retries from a known-good point instead of debugging debris.
Batch also cuts the number of requests per turn, which matters once you hit a provider's per-minute limit.
Mistake 4: instructions living in schemas
Every tool description ends up wanting three paragraphs: coordinate conventions, edge IDs, what "face" means. Put them in the schema and you pay for them on every request.
So get_help(topic) returns the long version on demand. Schemas stay one line, the model fetches the page it needs, and the context bill drops by a third.
Mistake 5: screenshots
The assistant needs to see the result. Four viewport screenshots per iteration is four images of mostly-empty grid.
Instead it can request one render with four views, the part framed and cropped to its bounding box. One image, less tokens, and no need to reconstruct the shape from context.

The render also draws edges on top by default. That matters more than it sounds: after a boolean, a chamfer or a thread, the silhouette barely changes, and the only way to see what actually happened is the edge lines. The model can turn them off (show_edges: false) when it wants a clean shape, but by default they stay on.
Mistake 6: permissions as an afterthought
Once the assistant could delete objects and overwrite projects, "just let it run" stopped being acceptable. Two things came out of that:
Roles. Engineer has full access and never asks. Analyst reads the scene — dimensions, edge coordinates, degrees of freedom — and asks before changing anything. Teacher sits between: it explains and refuses to do the exercise for the student.
Confirmations. Destructive calls from Teacher and Analyst produce a card with the tool name and arguments; the user allows or rejects. No answer in three minutes counts as a rejection.
The subtle part is what the model sees after a rejection. It gets a tool error that says, in effect: the user declined this, do not execute it, explain the options and offer an alternative. Not a silent false. Silence makes models retry, and retrying a rejected action is the fastest way to lose a user's trust.
Repeating the exact same call in the same turn is blocked separately — otherwise a stubborn model just tries again.
Mistake 7: answering with a uuid and nothing else
For a long time every tool answered "done, here is the uuid". The model then had to call get_object to learn where the thing actually landed — an extra round trip after every step, and a chance to drift: it remembers a position from three calls ago and confidently cuts a hole in the wrong place.
Since 0.9.91d the response carries the state. After any create, move, rotate or scale, objects come back with uuid, name, type, position, rotation, size, volume and bounding box.
Sketch calls go further: they return the actual geometry with world coordinates, not just identifiers. A constraint call returns moved — which elements the solver really shifted, with before, after and delta, so "I fixed the sketch" can be checked against what actually moved. And add_sketch_entities returns the regions it produced, so the model does not need a separate get_sketch_state before calling extrude.

The model can still ask for more detail. Most of the time it does not have to, and "most of the time" is what keeps a long session from drifting.
What still hurts
Errors are written for humans. "Edge not found" tells the model nothing it can act on. It needs the same information structured: what was expected, what was found, what to try instead. Half of my prompt hacks exist to work around unstructured errors.
Arguments are not uniform. Some tools take uuids, some accept a name or a short prefix, some want arrays of edge objects. Every inconsistency costs a call and a paragraph of instructions.
Rate limits are silent. GigaChat allows 25 requests per minute, and the gateway answers 502 or 504 instead of a proper 429. The retry logic has to guess whether it hit a limit or the server is down — which is exactly the kind of guessing I am trying to remove from the model.
The numbers

An M12 nut with a real thread, built by DeepSeek through the assistant: about 200,000 tokens.
A fraction of a cent. The thread alone is a few dozen operations, and most of the context is cache hits — the schemas and the conversation barely change between steps.
None of the seven fixes above is clever. They are the same things you would do for a human API consumer: less surface area, faster feedback, safe retries, and permissions that fail closed. With models it just becomes obvious much faster, because a model will happily call all 90 tools in the wrong order if you let it.
First article, if you want the architecture part: I gave my browser CAD an MCP server
About the author
- I build KontrCAD — a parametric CAD that runs in a browser: sketches with constraints, fillets, assemblies, and an MCP server so AI assistants can build models through the operation history. Teacher by day.
Comments
Join the discussionNo comments yet. Be the first to comment.