Tool interfaces with clear descriptions and boundaries
What this covers
- Write descriptions that differentiate a tool from its neighbors
- Recognize misrouting caused by overlapping descriptions
- Split a generic tool into purpose-specific ones
- Specify the input formats and edge cases a tool accepts, not only what it does
- Name what a tool is not for, so the boundary travels with the tool
- Check the system prompt for keyword-sensitive wording when routing misbehaves
instrument plate / 2.1
Route by contract, not by keyword
Change the request. The routing arm follows the tool whose description, boundary, and input contract make it the defensible choice.
case reading / read-only lookup
Select get_order.
Its description promises retrieval and its schema requires only an order ID.
Read the complete diagram as text
- Read the request for its goal and constraints, not just its keywords.
- Compare neighboring tools by description, input contract, side effects, and exclusions.
- Use separate retrieval, mutation, and documentation tools when their boundaries differ.
- If two tools remain equally plausible, repair their names or boundaries instead of adding routing prose.
Key terms
- JSON Schema
- A set of rules that describes the required shape and allowed values of JSON data.
- Prompt
- The instructions and information given to a model.
- Tool
- A function an agent can call to read information or take an allowed action.
Descriptions guide tool selection
A tool description is the primary mechanism the model uses to select a tool. It is not documentation for humans that the model happens to see — it is the input to the routing decision.
Minimal descriptions make selection less reliable, especially among tools with similar purposes. Two tools described as "Retrieves customer information" and "Retrieves order details" give the model almost nothing to choose on when a request mentions both a customer and an order.
What to include in a description
- what the tool is for, and what it is not for
- input formats it accepts
- example queries
- edge cases
- when to use it versus a similar alternative
The comparison with similar tools is important. A description should explain when to choose this tool instead of another tool with a related purpose.
Two entries in the course catalog, Introduction to Statistics and Statistical Methods, each described accurately and neither telling you which one you should take. The line that settles it is the one comparing them: take this one if you haven't done calculus.
A tool definition is a name, a description, and an input schema. The description is the field selection actually runs on:
{
"name": "extract_data_points",
"description": "Pulls named fields out of a document into a record. Use this when the caller needs specific values. Use summarize_content instead when the caller needs the gist.",
"input_schema": {
"type": "object",
"properties": { "document_id": { "type": "string" } },
"required": ["document_id"]
}
}The sentence that compares the two tools gives the model a clear selection rule.
Input formats deserve the same care, for a different reason. An underspecified parameter rarely fails loudly: 3/4/25 is a valid date in two calendars, so the call succeeds against the wrong month and reports nothing. State the accepted format in the parameter's own description and show one example of it.
"deliveredAfter": {
"type": "string",
"description": "ISO 8601 date, YYYY-MM-DD. Example: 2025-03-04. Slash-separated dates are rejected, because 3/4/25 is ambiguous."
}The format rule lets the tool reject an ambiguous date instead of searching the wrong date range.
Rename tools with overlapping purposes
analyze_content and analyze_document with near-identical descriptions will misroute no matter how the model is prompted. The fix is at the interface: rename and re-scope. analyze_content becomes extract_web_results with a web-specific description, and the overlap disappears because the tools are now about different things.
Splitting generic tools
A tool named analyze_document that does several unrelated jobs invites the model to reach for it whenever a document is involved.
Split it into purpose-specific tools with defined input and output contracts: extract_data_points, summarize_content, verify_claim_against_source. Each has an unambiguous trigger, and none competes with the others.
Split only when the jobs differ. When the job is the same and only the target changes — one search run against nine corpora — nine near-identical descriptions compete for every request. That belongs in one tool with an enumerated parameter, each accepted value described, so the difference is stated once.
Check the system prompt too
A well-written tool description can be overridden by keyword-sensitive wording in the system prompt. A sentence like "when the user asks to analyze anything, be thorough" can create an unintended association with whatever tool has "analyze" in its name.
When routing misbehaves, the system prompt is the second place to look.
The dependence runs one way. A boundary written into the description travels with the tool, so every agent given that tool reads it. The same boundary stated in a system prompt holds for that one agent and disappears the moment the tool is handed to another.
tool descriptionsinput contractssystem prompt wording
Field note — common misconceptions
- MythThat a short accurate description is sufficient
- ActuallySelection also needs input formats, edge cases, and when to use this tool over a similar one.
- MythThat misrouting is a model capability problem
- ActuallyOverlapping descriptions misroute no matter how the model is prompted; rename and re-scope.
- MythThat the system prompt cannot override a good description
- ActuallyKeyword-sensitive system prompt wording can attach a request to whatever tool shares that word.
Guided review
Review this lesson as a study deck
Review the lesson's main ideas in five guided slides, then test yourself with three flashcards.
Open Task 2.1 study deckCross-domain reasoning
Connect this idea
Tool access sets an authority boundary
Hooks, tool descriptions, access limits, MCP configuration, and escalation rules decide what an agent may do and when another person or system must decide.
Applied practice
Practice this lesson in a lab
Use a related lab to create a decision, implementation or diagram, evidence record, and review.
- Lab 1 · Manual tool-use loop
Build the application-controlled loop behind a small note assistant, then make every stop state visible.
- Lab 5 · Design and test an MCP server
Design narrow MCP capabilities for a synthetic note catalog and test every trust boundary.