Picture an MCP server for a warehouse inventory system. It knows what is on the shelves and where each item sits, and a planner uses it to decide what to reorder.
A planner asks the model, “How much 12 oz black beans are in Aisle 12?” The model calls search_stock and gets this back:
{ "id": "7c21-90e4", "st": 4, "q": 1840, "uom": 2, "loc": [12, 3, 4]}Now the model has to turn that into an answer for a person, and it has some questions of its own. Is q cans or cases, and what do uom: 2 and st: 4 stand for? Are the numbers in loc aisle, bay and shelf, or something else entirely?
Because it cannot lean over and ask the planner at the next desk, the model does what models do and guesses with complete confidence. In a warehouse a guessed unit quickly becomes a purchase order for the wrong amount.
The annoying part is that nothing in that response is a bug. It is a perfectly good API response that happens to be the wrong thing to hand a model.
We argued in an earlier post that you should build MCP servers for your own systems. This is the how, and it starts with understanding who you are building for.
An MCP is not an API
An API serves a developer who reads the docs once, writes some code against them and then, like a normal person, never looks at them again. A model reads your descriptions fresh in every conversation, which makes every conversation its first day on the job. It has a limited context window to hold everything it learns that day and has to decide on the spot what to do with it. Wrapping each endpoint as a tool is like handing a first-day employee your database schema and wishing them luck.
So start from the other end. Before you write any server code, write down the questions your users will actually ask, rather than the CRUD endpoints you already have.
Questions a planner asks How much 12 oz black beans are in Aisle 12? Which items have no supplier assigned yet? What changed since last week's count?Endpoints the API has GET /items POST /items PUT /items/{id} GET /orders/{id}/linesEach of those questions is a scenario, and a scenario is something a tool should be able to complete in one or two calls. Mapping every question to the tool that answers it makes that easy to see:
One question, one call search_stock How much 12 oz black beans are in Aisle 12? search_stock Which items have no supplier assigned yet? compare_counts What changed since last week's count?That map is your tool strategy, so write it first and let the tools fall out of it. You may have noticed that it holds three questions and only two tools, and we will come back to that in a moment.
In short
- Don’t build an MCP the way you build an API.
- Start from the questions users could ask, not CRUD endpoints.
- Have a tool strategy before you build anything.
Make the tools work as a team
Once the map exists the tools start to appear, and this is the moment they need to learn to get along. The model chooses between them on every turn, which makes them one package rather than separate entities. Tools written one at a time each invent their own vocabulary, so the model ends up learning a small dialect for every one of them:
Written one at a time search_stock aisle: "Aisle 12" search_order_lines row: 12 compare_counts aisle_no: "A12"Designed as a set search_stock aisle: "Aisle 12" search_order_lines aisle: "Aisle 12" compare_counts aisle: "Aisle 12"Using the same name and the same shape in every tool lets the model carry what it learns from one to the next, so review the whole set side by side instead of one tool at a time.
Reviewing the set side by side has a second benefit, because it shows how many tools you really need. Remember the map from earlier, where three questions needed only two tools? The question that was written:
Which items have no supplier assigned yet?
It looks like it deserves its own find_items_without_supplier, but it is only a filter on search_stock set to has_supplier: false.
Every extra tool is another door in the hallway, and its description costs context on every request, so with enough doors the model ends up standing in the hallway instead of walking through one. A feature that fits into an existing tool belongs there.
Fewer doors still leave the question of what is behind each one, and the answer is to go broad first and deep second:
Before: six tools get_item get_item_quantity get_item_locations get_item_tags get_item_suppliers get_item_historyAfter: two tools search_stock an overview of many items, a few facts each describe_item one item in depth: counts, locations, suppliers, historyThat gives the model the lay of the land cheaply and lets it spend context only on the item that matters.
In short
- Plan the tools as one cohesive package, not as separate entities.
- Limit tool explosion: merge a feature into an existing tool when it fits.
- Offer one overall tool with limited information, and tools that dig deep when needed.
Speak the planner’s language
With a small and consistent set of tools shaped like the questions, we can return to the part that went wrong at the very start, which is what the tools say back. Here is the same response rewritten for the new hire:
{ "item": "Black beans, 12 oz can", "status": "on hand", "quantity": "1,840 cases", "location": "Aisle 12, bay 3, top shelf", "supplier": "none assigned yet, so it can't be reordered", "id": "sku-7c21"}Three things changed:
1. Codes became words.
Before{ "uom": 2, "st": 4 }After{ "unit": "cases", "status": "on hand" }Give the model a glossary that explains your customer and domain jargon. For example, your users say “bin” while your schema says location_slot, and the glossary is where the two finally meet and agree to be civil.
Just as important, keep implementation terms like table names, internal service names and enum values out of every tool, resource and property description, because whatever leaks into a description will leak into the answer.
2. Numbers got a meaning.
Before{ "loc": [12, 3, 4] }After{ "loc": { "aisle": 12, "bay": 3, "shelf": 4 } }Or, in words{ "location": "Aisle 12, bay 3, top shelf" }Bare numbers tell the planner nothing and tell the model very little, so label them, or simply use words when words are enough.
3. IDs only when they lead somewhere.
An ID belongs in a response when the model can hand it to another tool to go deeper, and describe_item takes this one. An ID that leads nowhere is a locker number with no locker room, which is just noise and an invitation for the model to read it out loud to the planner.
In short
- Explain customer and domain jargon in the glossary, and keep technical leaks out of every description.
- Return text the user understands, like aisle and bay, instead of bare numbers.
- Return an ID only when another tool can use it to go deeper.
Leave breadcrumbs
Sometimes the model picks the wrong tool. A planner asks about the lines on a customer order, and the model calls search_stock simply because the name sounds right. The tool can catch that mistake with one line in its description that says where to go instead:
search_stock Items on the shelves, like black beans by aisle. → For lines on a customer order, use search_order_lines instead of this tool.The model reads that line and switches to search_order_lines, so the wrong guess costs one extra call instead of a wrong answer.
A line like this is called a breadcrumb: a short pointer that tells the model where to go next. Responses can leave breadcrumbs as well. The ID from the last section is one, and so is a message that says where to look next when a search finds nothing:
A response with an ID{ "item": "Black beans, 12 oz can", "id": "sku-7c21", "next": "describe_item takes this ID for the full detail."}A search that finds nothing{ "results": [], "message": "No items match 'Aisle 40'.", "next": "This warehouse has Aisles 1 to 20. Try one of those."}Breadcrumbs only work if they stay small, so long how-to text such as which unit of measure fits which product belongs in a resource document. The tool then carries one line and a pointer:
search_stock Items on the shelves, like black beans by aisle. → Units of measure: read inventory://units-of-measureDescriptions are paid for on every request, while a resource is paid for only when the model reads it.
In short
- Make tools point the model to the right tool when they can’t answer.
- Point the model to resource documents instead of packing everything into descriptions.
Deploy the tools together
Every breadcrumb is a dependency. A tool description that says to use search_order_lines instead, or a resource that explains how to call describe_item, assumes that tool is there, which makes it surprisingly hard to switch a single tool on or off. A pointer to a tool that is not available gets followed with the same complete confidence as everything else, and the model then politely makes up the result.
So release the tools that need each other as one subset instead of one at a time, and let every pointer ship in the same release as the tool it points to:
Release 1: tools that point at each other search_stock points to describe_item and search_order_lines describe_item points back to search_stock search_order_lines points back to search_stockRelease 2: the tool that comes later compare_counts and the line in search_stock that points to itBefore each release, read every tool description and resource in it and check that nothing they mention has been left out.
Once the whole set is out the door the model rarely gets lost, but it does tend to get enthusiastic.
In short
- Deploy tools that point to each other together, not one at a time.
Plan for enthusiasm
A model wants to help, which is mostly wonderful and occasionally a problem. Ask it to tag 40 items by category and it will cheerfully make 40 calls, and somewhere around call 31 it may lose count while still reporting that all 40 are done.
The fix is a batch. Let create and update take many items in one call, and the whole job becomes one call with one result:
Before: 40 calls{ "item": "sku-0001", "tag": "Category: Canned goods" }{ "item": "sku-0002", "tag": "Category: Canned goods" }... 38 moreAfter: 1 call{ "items": ["sku-0001", "sku-0002", ..., "sku-0040"], "tag": "Category: Canned goods"}Response{ "tagged": 40, "failed": 0 }Enthusiasm shows up in searches as well. A broad search on a big warehouse can return every item at once and flood the context in a single response, so return a page instead, say how many results exist (“25 of 312 items”) and explain how to get the next one:
{ "items": ["sku-0001", "sku-0002", ..., "sku-0025"], "showing": "25 of 312 items", "next": "Call search_stock with page: 2 for the next 25."}When the model is truly confused, its enthusiasm turns into a loop of retrying the same tool with a new spelling of Aisle 12 each time, such as A12 or Aisle-12. It never gets tired and it never goes for coffee, so a rate limit is what keeps one lost conversation from becoming a load problem for the system behind the tool. The error message is one more chance to guide:
Too many calls to search_stock: 30 in 10 seconds.Narrow by aisle or category, or use describe_item for an item you already have.In short
- Allow multiple creates and updates in one call to limit tool calls.
- Paginate every list and search.
- Rate limit your tools so a confused model can’t loop on them.
The model is your user
Every conversation is a first day for the model, and it has less context than any user you have built for, yet it will do its honest best with whatever you hand it. The tool descriptions are your UI, so design them like it.
You can test this today by taking any tool response, hiding your code and handing it to a new hire along with one planner’s question. Wherever they stall is where the model will guess.
If you only keep a card in your pocket:
Plan the set
- Don’t build an MCP the way you build an API.
- Start from the questions users could ask, not CRUD endpoints.
- Have a tool strategy before you build anything.
- Plan the tools as one cohesive package, not as separate entities.
- Limit tool explosion: merge a feature into an existing tool when it fits.
- Offer one overall tool with limited information, and tools that dig deep when needed.
Speak the user’s language
- Explain customer and domain jargon in the glossary, and keep technical leaks out of every description.
- Return text the user understands, like aisle and bay, instead of bare numbers.
- Return an ID only when another tool can use it to go deeper.
Guide the model
- Make tools point the model to the right tool when they can’t answer.
- Point the model to resource documents instead of packing everything into descriptions.
Deployment of tools
- Deploy tools that point to each other together, not one at a time.
Keep it from running away
- Allow multiple creates and updates in one call to limit tool calls.
- Paginate every list and search.
- Rate limit your tools so a confused model can’t loop on them.