Rubric
Contents — domains, guide and mocks

Tool descriptions and boundaries

CCAR-F 2.116 min read · checked 21 September 2026

Task statementDesign effective tool interfaces with clear descriptions and boundaries

How Claude chooses a tool

  1. You send toolsname, description, input_schema
  2. API builds the prompttool definitions + your system prompt
  3. Claude picks a toolby matching each described purpose
  4. Claude fills inputstool_use block, per the schema
Everything Claude knows about a tool arrives in step 2 — it never sees your code. If two descriptions both match the request in step 3, the choice comes down to wording — which is where misrouting starts.

The description is the interface

When you pass tools to the Messages API, the API assembles a special system prompt from your tool definitions, your tool configuration and your own system prompt. With the default tool_choice of auto, Claude decides on each turn whether a request maps to a tool’s described capability. Nothing else about the tool — its code, its database, its author’s intentions — reaches the model. That is why Anthropic’s documentation calls detailed descriptions “by far the most important factor” in tool performance.

FieldRequired?What it does for tool selection
nameYesMust match ^[a-zA-Z0-9_-]{1,128}$. The first thing Claude — and tool search — scans
descriptionYesWhat the tool does, when to use it, when not to, and what it returns
input_schemaYesA JSON Schema for the inputs; each property can carry its own description
input_examplesNoSchema-valid example inputs for complex or format-sensitive tools
strictNotrue constrains Claude’s inputs to match the schema exactly

The docs list what a good description covers, and recommend at least three to four sentences — more for a complex tool:

  • What the tool does, in terms of the task rather than the implementation.
  • When to use it — and when not to, naming the sibling tool to use instead.
  • What each parameter means and how it changes the tool’s behaviour, including formats.
  • Caveats and limits: scope, freshness, maximum sizes, permissions.
  • What it returns — and what it does not, so Claude does not expect data the tool never supplies.
A tool definition that draws its own boundariespython
orders_lookup = {
    "name": "orders_lookup",
    "description": (
        "Look up one customer order by its order number. Returns status, items, "
        "carrier and tracking number. Use it when the customer gives an order "
        "number or asks where a specific order is. Do not use it to find orders "
        "by name or email: call crm_find_customer first to get order numbers. "
        "It returns no payment or refund data; use billing_get_payment for that."
    ),
    "input_schema": {
        "type": "object",
        "properties": {
            "order_number": {                     # not "id" or "order"
                "type": "string",
                "description": "Order number from the receipt, e.g. A-1042.",
            },
        },
        "required": ["order_number"],
        "additionalProperties": False,
    },
    "input_examples": [{"order_number": "A-1042"}],   # must be schema-valid
    "strict": True,                               # inputs always match the schema
}

Read the description as Claude would. It says what the tool is for, points away from two neighbouring jobs by name, and warns what is missing from the result. Anthropic’s engineering team suggests writing it the way you would brief a new hire: make explicit the context you carry in your head — query formats, in-house terminology, how records relate to each other.

Why overlapping tools misroute

Misrouting rarely comes from a single bad description. It comes from two descriptions that could both honestly answer the same request. Given “Searches documents” and “Finds records matching a query”, Claude has no basis for choosing, so surface wording in each request tips it one way or the other — and the behaviour looks random. Anthropic’s troubleshooting guide puts the fix precisely: differentiate tools by when to use them, not only by what they do.

Overlap versus clear boundaries

Before: overlapping

search_documents
  "Searches documents."

find_records
  "Finds records matching a query."

After: distinct jobs

contracts_search_clauses
  "Searches clauses in contracts the
  firm has signed or drafted. Input:
  client_name, optional clause_type.
  Returns clause text, document, page.
  Not for court filings: use
  court_filings_search."

court_filings_search
  "Searches public court dockets by
  case_number or party name. Returns
  filing title, date and docket entry.
  Not for the firm’s own contracts:
  use contracts_search_clauses."
Same two capabilities, same code behind them. Only the names and descriptions changed — and each description now says where its sibling’s job begins.

Where to draw the line: split or consolidate

Two pieces of Anthropic advice look contradictory at first. The tool-use docs say to consolidate related operations — rather than create_pr, review_pr and merge_pr, offer one tool with an action parameter. The engineering post goes further: a schedule_event tool that finds availability and books the meeting beats separate list_users, list_events and create_event tools. Yet a task statement about clear boundaries often points the other way: splitting a generic tool into purpose-specific ones. Both are true, because the unit is neither “an endpoint” nor “a verb”. It is one distinct purpose with a predictable contract.

Signal in the transcriptsWhat it meansMove
One tool’s output shape changes with how the request is phrasedIt is hiding several jobs behind one nameSplit into purpose-specific tools, each with a defined input and output
Claude always chains the same three calls to finish one taskThe task is one job cut into piecesConsolidate into one workflow tool
Several tools differ only by a verb on the same resourceNear-synonyms Claude must choose betweenConsolidate behind an action enum
Two tools could both answer the same requestTheir boundary is undefinedRename and rewrite both descriptions by when to use them

Which fix does this tool set need?

What do the transcripts show?
  • Two tools fit one request
    Rename and differentiatedescribe when, and when not
  • One tool, many output shapes
    Split by purposeone contract per tool
  • Same chain of calls every time
    Consolidate the workflowone tool per real task
  • Right tool, malformed inputs
    Fix the parametersclear names, examples, strict
Diagnose from transcripts, then change the definition. Every branch ends in the tool set itself — none ends in a longer system prompt.

Parameters are part of the boundary

Choosing the right tool is half the job; calling it with the right inputs is the other half. Anthropic’s advice is concrete. Name inputs unambiguously — user_id, not user. Give every property a description with its format and an example. Use an enum when the set of values is closed. For inputs whose shape is hard to convey in prose, add input_examples: each example must validate against the schema or the request fails with a 400, and each costs prompt tokens, so keep them for tools that need them.

Better still, design inputs so the wrong call is impossible — the “poka-yoke” idea from Anthropic’s Building effective agents. Anthropic’s SWE-bench agent kept making mistakes with relative file paths after changing directory; requiring absolute paths removed the whole class of error. Setting strict: true goes one step further for types: Claude’s inputs are constrained to match the schema, so you get 2, not "two".

When the system prompt fights the description

Your system prompt and your tool definitions end up in the same prompt, and the system prompt can steer tool use — the docs note that a light instruction such as “use the tools to investigate before responding” increases tool calls. That power cuts both ways. A rule keyed to a word, such as “whenever the customer mentions a refund, call billing_issue_refund”, fires on the word, not the intent: “what is your refund policy?” now triggers a refund attempt, however carefully the tool’s description says it is only for approved refunds.

  1. Search the system prompt for tool names and trigger words (“whenever”, “if the user mentions”, “always call”).
  2. For each, ask whether it restates a boundary the description should own. If so, move it into the description and delete the rule.
  3. Keep system-prompt guidance at the level of intent and policy — for example, that refunds need a verified order and a manager’s approval — not keyword routing.
  4. Re-test with requests that contain the trigger word but not the intent.

A related boundary: keep your own instructions out of tool results. Claude treats instructions that arrive inside a tool_result as potentially untrusted third-party content, so a tool that returns “now call X” may be ignored or questioned. Tools should return data; instructions belong in the prompt.

Boundaries at scale: names, namespaces and tool search

Selection gets harder as the tool set grows: Anthropic’s docs say accuracy degrades once more than 30–50 tools are loaded at once. The first defence is namespacing — prefix each tool with its service or resource (github_list_prs, slack_send_message, asana_projects_search) so the name alone says which system it touches. The engineering post adds that prefix versus suffix naming has measurable effects, so test your choice.

The second defence is tool search. With defer_loading: true, a tool’s full definition stays out of context until Claude finds it with a search over tool names, descriptions, argument names and argument descriptions. That makes wording matter even more: the Agent SDK docs note that a name like search_slack_messages surfaces for more requests than query_slack, and a description with specific keywords beats a generic one.

Every layer of a tool’s boundary

From what Claude reads to what your system enforces

  1. Namenamespaced, specific, searchable
  2. Descriptiondoes, when, when not, returns
  3. Input schemaclear names, enums, examples, strict
  4. AnnotationsreadOnlyHint and others — hints only
  5. Handler and permissionsvalidates inputs, enforces access
The top three layers shape what Claude attempts; the bottom two decide what actually happens. Hints are not enforcement — a tool marked read-only can still write if its handler does.

Tools from MCP servers follow the same rules. An MCP tool declares a name, a description and an inputSchema, and may add an outputSchema and behavioural annotations such as readOnlyHint and destructiveHint. The MCP specification says clients must treat annotations as untrusted unless the server is trusted, and the Agent SDK docs call them metadata, not enforcement. In the Agent SDK, a tool from a server registered as crm appears to Claude as mcp__crm__<tool> — the server name becomes a namespace for free, but the tool’s own name and description still have to do the work.

Traps the wrong answers are built from

Tempting but wrongDo this instead
One-line descriptions such as “Gets the stock price”Three to four sentences or more: what it does, when and when not to use it, parameters, limits, what it returns.
Two tools whose descriptions both fit the same requestDifferentiate by when to use each, rename to show scope, and point each to its sibling.
A generic tool whose output depends on how the request is phrasedSplit it into purpose-specific tools, each with a defined input and output contract.
Patching misrouting with keyword rules or routing examples in the system promptFix the tool definitions, and remove keyword triggers that override them.
Wrapping every API endpoint as its own toolDesign tools around the agent’s tasks; consolidate steps that always run together.
Treating strict or annotations as the boundaryThey shape inputs and describe behaviour; enforce access in the handler and permissions.

You should now be able to

  • Write tool descriptions that state purpose, when and when not to use, inputs, limits and outputs.
  • Diagnose misrouting between tools with overlapping descriptions and fix it by renaming and rewriting.
  • Decide whether a tool set needs splitting into purpose-specific tools or consolidating into workflow tools.
  • Design parameters with unambiguous names, formats, enums and examples, and know what strict guarantees.
  • Find system-prompt instructions keyed to words that override well-written tool descriptions.
  • Use namespacing and tool search so large tool sets stay selectable.

Practice questions

Original questions written for this lesson, in the exam’s style. Answer first, then open the reasoning — every option is explained, including why the wrong ones are tempting.

  1. Question 1

    A market-research agent has get_web_results (“Gets results for a query”) and get_article_data (“Gets data for a query”). The first searches the web; the second queries a licensed news archive. Logs show news questions going to web search about half the time.

    What is the most effective first change?

    1. AAdd six routing examples to the system prompt showing which tool fits which question.
    2. BRewrite both descriptions to say what each source covers and when to use the other.
    3. CPut a lightweight classifier in front of the agent to pick the tool before Claude runs.
    4. DMerge both into one search tool that takes a free-text source parameter.
    Show answer and reasoning
    1. AIncorrect. Examples help the phrasings they cover but leave both descriptions ambiguous for every other request.
    2. BCorrect. The descriptions are the root cause: neither says when it applies. Differentiating by when to use each fixes all phrasings at once.
    3. CIncorrect. It adds a component and latency to work around definitions that could simply be made clear.
    4. DIncorrect. Claude would still have to choose a source with no better guidance — the ambiguity moves into a parameter.
  2. Question 2

    A claims agent uses one tool, process_document, with a free-text task input. Depending on the wording, it returns extracted fields, a summary or a coverage opinion, and the downstream system that expects fields often breaks.

    Which two changes address the design problem? (Select 2.)

    1. ASplit it into separate tools for extraction, summarising and coverage checks.
    2. BGive each new tool a description stating when to use it versus its siblings.
    3. CSet strict: true so the tool’s output always matches a schema.
    4. DTell Claude in the system prompt to always ask for extracted fields.
    5. EUse tool_choice to force process_document on every turn.
    6. FRaise max_tokens so every result has room for all three outputs.
    Show answer and reasoning
    1. ACorrect. Each job gets a predictable contract, so both Claude and downstream code know what comes back.
    2. BCorrect. Splitting creates new neighbours; each description must mark where its job ends so the new tools do not overlap.
    3. CIncorrect. Strict mode constrains Claude’s inputs, not the tool’s output, so the varying result shape is untouched.
    4. DIncorrect. That hides the other two jobs rather than giving them proper tools, and prompt rules are easy to override.
    5. EIncorrect. Forcing the call does nothing about what the tool returns; the problem is the tool’s boundary.
    6. FIncorrect. Output length is not the issue; one tool serving three different contracts is.
  3. Question 3

    A retailer’s support agent has a well-described billing_issue_refund tool that says it is only for refunds already approved. The system prompt also says: “Whenever the customer mentions a refund, call billing_issue_refund.” Customers asking about the refund policy trigger refund attempts.

    What should the architect do?

    1. AExpand the tool description further so it repeats the approval rule.
    2. BSet tool_choice to none whenever the message contains the word “policy”.
    3. CRemove the keyword rule and let intent-level guidance plus the description decide.
    4. DAdd a confirmation step before every refund, while keeping the rule in place.
    Show answer and reasoning
    1. AIncorrect. The description is already clear; a keyword rule in the system prompt is overriding it.
    2. BIncorrect. That swaps one keyword rule for another and blocks legitimate tool use.
    3. CCorrect. The rule fires on the word, not the intent. Removing it lets the tool’s boundary — approved refunds only — govern the choice.
    4. DIncorrect. A confirmation reduces damage but leaves the misrouting and the extra friction for every policy question.
  4. Question 4

    An internal IT agent connects to five MCP servers exposing about 60 tools. Several servers offer a tool called search or create_ticket, and Claude often files tickets in the wrong system.

    Which change most directly fixes the selection problem?

    1. AList every tool and its server in a long table in the system prompt.
    2. BRemove the descriptions to save context, since the server name is enough.
    3. CMove to a larger model that can keep track of more tools at once.
    4. DGive tools service-prefixed names and descriptions naming the system they act on.
    Show answer and reasoning
    1. AIncorrect. It adds tokens and duplicates the definitions without making the tools themselves distinguishable.
    2. BIncorrect. Descriptions are the main selection signal; removing them makes misrouting worse.
    3. CIncorrect. Duplicate generic names are a design ambiguity that a bigger model still has to guess at.
    4. DCorrect. Namespacing and specific descriptions make each tool’s scope obvious, and help tool search find the right one.

Sources

Drafted with AI assistance and checked against the sources above; expert review is in progress. Spotted an error? Tell us and it gets fixed, dated and listed on how this is written.