Task Statement 2.1·Domain 2 — 18% of exam
Tool Interface Design
Design effective tool interfaces with clear descriptions and boundaries
Official Exam Guide Objectives
Task 2.1: Design effective tool interfaces with clear descriptions and boundaries.
Knowledge of
- Tool descriptions as the primary mechanism LLMs use for tool selection; minimal descriptions lead to unreliable selection among similar tools
- The importance of including input formats, example queries, edge cases, and boundary explanations in tool descriptions
- How ambiguous or overlapping tool descriptions cause misrouting (e.g., analyze_content vs analyze_document with near-identical descriptions)
- The impact of system prompt wording on tool selection: keyword-sensitive instructions can create unintended tool associations
Skills in
- Writing tool descriptions that clearly differentiate each tool's purpose, expected inputs, outputs, and when to use it versus similar alternatives
- Renaming tools and updating descriptions to eliminate functional overlap (e.g., renaming analyze_content to extract_web_results with a web-specific description)
- Splitting generic tools into purpose-specific tools with defined input/output contracts (e.g., splitting a generic analyze_document into extract_data_points, summarize_content, and verify_claim_against_source)
- Reviewing system prompts for keyword-sensitive instructions that might override well-written tool descriptions
What You Need to Know
Tool descriptions are the PRIMARY mechanism LLMs use for tool selection. Not supplementary metadata. Not an afterthought. The mechanism. A model handed a toolkit reads the descriptions and decides from them — so where two tools are described in terms that could apply to either, there is nothing else for it to go on and the selection becomes a guess.
What Makes a Good Tool Description
A production-grade tool description includes five elements:
- What the tool does — the purpose, stated so it could not be mistaken for another tool's
- What inputs it expects — types, formats, permitted ranges, and which fields are required rather than optional
- Example queries it handles well — concrete cases that show the model what a good match looks like
- Edge cases and limitations — what it will not do, and how it behaves when given something outside its range
- Explicit boundaries — the conditions under which a neighbouring tool is the right call instead
Here is the difference between a minimal and a production-grade description:
Minimal (causes misrouting):
get_customer: "Gets customer info" lookup_order: "Gets order info"
Production-grade (reliable selection):
get_customer: "Finds one customer account, given an email address, a phone number or a customer ID. Returns the profile: name, contact details, account status and loyalty tier. Reach for this when the question is who you are dealing with. Anything about a particular order belongs to lookup_order, not here."
lookup_order: "Returns one order, given an order number (format: #NNNNN) or a tracking ID. Covers current status, the items on it, shipping detail and whether it is eligible for a refund. Reach for this when the customer names an order. Establishing who the customer is belongs to get_customer, not here."
Read the second pair as a decision procedure rather than documentation. Each entry states which identifiers it accepts, what comes back, and — the part that does the real work — the circumstances under which the other tool is the correct choice. There is no case where both look equally applicable.
The Misrouting Problem
Descriptions that overlap produce selection that wavers. Q2 in the sample set builds on exactly this: get_customer and lookup_order described in one line each, and an agent sending "check my order #12345" to the wrong one.
The exam tests whether you can spot the correct fix. Four plausible options, three of them wrong:
- Expand descriptions — correct. It acts on the thing that actually decides selection, and costs an afternoon of writing.
- Few-shot examples — wrong. Examples demonstrate the right choice case by case while leaving the descriptions just as ambiguous, so the confusion persists everywhere the examples do not reach.
- Routing classifier — wrong. It builds infrastructure to make a decision the model is already equipped to make, and sets aside the language understanding you are paying for.
- Tool consolidation — wrong as a first step. Merging tools is a legitimate architectural move, but it is a redesign, and a redesign is not the proportionate answer to a description that needed two more sentences.
A pattern runs through these, and it is worth carrying into other items: the exam consistently favours low-effort, high-leverage fixes. Better descriptions before routing classifiers. Scoped access before full access. Community servers before custom builds.
Tool Splitting
A tool with a broad remit cannot be described precisely, because there is no single thing it does. Splitting it into purpose-specific tools gives each one a description that can be exact.
Before splitting:
analyze_document: "Runs analysis over a document and returns what it finds"
After splitting:
extract_data_points: "Extracts structured data fields (dates, amounts, names) from a document"
summarize_content: "Produces a concise summary of a document's key arguments and conclusions"
verify_claim_against_source: "Checks whether a specific claim is supported by the source document, returning supporting/contradicting evidence"
Each of the three now maps onto a request a user might actually make, which is what allows the model to choose between them on the strength of what was asked.
Tool Renaming for Clarity
Where two names invite confusion, renaming resolves it at the interface without touching anything underneath. Turn analyze_content into extract_web_results, give the description a web-specific framing, and the tool stops competing for requests that were never meant for it — no implementation change involved.
System Prompt Interactions
A system prompt can quietly overrule descriptions you have just spent time on. An instruction like "always check customer details before proceeding" plants a keyword association strong enough to pull customer-adjacent requests toward get_customer, whatever the tool entries say about boundaries.
So the description work is not finished until you have reread the system prompt for phrasing that competes with it. The failure is subtle, because both halves look correct in isolation, and the exam tests it.
Deep Dive
The tool definition contract in the Messages API
A client tool in the tools array is defined by a small, fixed set of fields:
| Field | Rule |
|---|---|
name | must match the regex ^[a-zA-Z0-9_-]{1,64}$ |
description | free text — this is the selection mechanism |
input_schema | a JSON Schema object defining the expected parameters |
input_examples | optional |
Anthropic's own ranking of these is unambiguous: "Provide extremely detailed descriptions. This is by far the most important factor in tool performance." Note also that passing tools at all causes the API to insert a special tool-use system prompt automatically — tools are never free, which is why a tool that earns its place must be described well enough to be chosen correctly.
{
"name": "lookup_order",
"description": "Retrieves order details by order number (format: #NNNNN) or tracking ID…",
"input_schema": {
"type": "object",
"properties": { "order_id": { "type": "string" } },
"required": ["order_id"]
}
}Sourceplatform.claude.com › define-toolsfetched 2026-07-30
The MCP tool definition adds an output contract
An MCP tool definition carries name (unique identifier), description (human-readable description of functionality), and inputSchema (JSON Schema defining expected parameters), plus optional title, outputSchema (JSON Schema defining the expected output structure), and annotations ("optional properties describing tool behavior"). Where the Messages API constrains only the input, MCP lets you pin the output too. Annotations are the slot for behavioural metadata, but treat them as advisory: the spec warns that "clients MUST consider tool annotations to be untrusted unless they come from trusted servers."
MCP's design guidance mirrors the splitting advice in this lesson: "Each tool performs a single operation with clearly defined inputs and outputs." Clients discover tools with tools/list and execute them with tools/call.
Sourcesmodelcontextprotocol.io › toolsmodelcontextprotocol.io › server-conceptsfetched 2026-07-30
The description has a hard budget in Claude Code
Claude Code truncates tool descriptions and server instructions at 2KB each. That is a real ceiling on "just write a longer description": keep them concise to avoid truncation, and put critical details near the start. A boundary statement buried in the fifth paragraph may simply never reach the model.
Tool search compounds this. It is enabled by default: MCP tool definitions are deferred rather than loaded into context upfront, Claude uses a search tool to discover relevant ones, and only the tools it actually uses enter context. Because the search is driven by text, server authors are told to write server instructions that explain what category of tasks the tools handle, when Claude should search for them, and the key capabilities the server provides.
Sourcecode.claude.com › mcpfetched 2026-07-30
Consolidate workflows; do not wrap endpoints; namespace what remains
Anthropic's tool-writing guidance identifies the default failure: "A common error we've observed is tools that merely wrap existing software functionality or API endpoints." The recommended shape is a small set of workflow tools:
- Instead of
list_users,list_eventsandcreate_event, buildschedule_event, which finds availability and schedules in one call. - Instead of
get_customer_by_id,list_transactionsandlist_notes, buildget_customer_context, which compiles the relevant information at once. - Instead of
read_logs, buildsearch_logs, returning only relevant lines plus surrounding context. - The same logic drives the address-book example:
search_contactsormessage_contactbeats paging throughlist_contacts, because reading an address book page by page is brute-force search.
"More tools don't always lead to better outcomes"; the advice is to "build a few thoughtful tools targeting specific high-impact workflows … and scale up from there". Where several tools genuinely must coexist, namespacing delineates them: by service (asana_search, jira_search) and by resource (asana_projects_search, asana_users_search). Anthropic found "selecting between prefix- and suffix-based namespacing to have non-trivial effects on our tool-use evaluations", so it is worth testing rather than assuming. Namespacing also reduces the number of tool descriptions loaded into context and "offloads agentic computation from the agent's context back into the tool calls themselves".
Sourceanthropic.com › writing-tools-for-agentsfetched 2026-07-30
What a good description actually contains
Two independent Anthropic sources converge on the same checklist. From the tool-design guidance: "A good tool definition often includes example usage, edge cases, input format requirements, and clear boundaries from other tools," and tool definitions "should be given just as much prompt engineering attention as your overall prompts." The test to apply is empathy: "Put yourself in the model's shoes. Is it obvious how to use this tool, based on the description and parameters, or would you need to think carefully about it? If so, then it's probably also true for the model."
From the tool-writing guidance: write it as you would describe the tool to a new hire — make the implicit context explicit (specialised query formats, definitions of niche terminology, relationships between underlying resources) and enforce expected inputs and outputs with strict data models. Two concrete mistake-proofing moves:
- Name parameters unambiguously —
user_id, notuser. - Make the schema prevent the mistake. (From the agent-building guidance.) Anthropic "changed the tool to always require absolute filepaths—and we found that the model used this method flawlessly" — the relative-path errors disappeared because the interface made them impossible.
Sourcesanthropic.com › building-effective-agentsanthropic.com › writing-tools-for-agentsfetched 2026-07-30
Descriptions are measurable, so iterate on them with evals
Description quality is not a matter of taste — it shows up in numbers.
- Claude Sonnet 3.5 reached state of the art on SWE-bench Verified "after we made precise refinements to tool descriptions, dramatically reducing error rates and improving task completion".
- An agent that tested flawed tools and rewrote their descriptions produced "a 40% decrease in task completion time for future agents using the new description".
- "Even small refinements to tool descriptions can yield dramatic improvements."
- The diagnostic signal runs the other way too: "lots of tool errors for invalid parameters might suggest tools could use clearer descriptions or better examples", and lots of redundant calls suggests pagination or token-limit parameters need rightsizing.
A real bug from this process: on launch, Claude was needlessly appending 2025 to the web search tool's query parameter, biasing results — fixed by improving the tool description, not by changing the model or adding a router.
Sourcesanthropic.com › writing-tools-for-agentsanthropic.com › multi-agent-research-systemfetched 2026-07-30
Quick Reference
| Fact | Value |
|---|---|
Tool name regex (Messages API) | ^[a-zA-Z0-9_-]{1,64}$ |
| Required client tool fields | name, description, input_schema (JSON Schema); input_examples optional |
| MCP tool definition fields | name, description, inputSchema; optional title, outputSchema, annotations |
| MCP tool discovery / execution | tools/list / tools/call |
| Single most important factor in tool performance | Extremely detailed descriptions |
| Claude Code description limit | Tool descriptions and server instructions truncated at 2KB each; put critical details first |
| Tool search default | Enabled — MCP tool definitions are deferred; only tools Claude uses enter context |
| Five elements of a production description | Purpose · inputs with formats · example queries · edge cases/limits · boundaries vs similar tools |
| Anthropic's own description checklist | Example usage, edge cases, input format requirements, clear boundaries from other tools |
| Design rule | Build workflow tools, not API wrappers (schedule_event, get_customer_context, search_logs) |
| Namespacing forms | By service (asana_search) and by resource (asana_projects_search); prefix vs suffix has measurable effects |
| Parameter naming | user_id, not user; mistake-proof the schema (require absolute filepaths) |
| Evidence descriptions matter | SWE-bench Verified SOTA from description refinements; 40% faster task completion after rewrite |
| Diagnostic: many invalid-parameter errors | Descriptions or examples are unclear — fix the description |
| MCP annotations | Disclose which tools need open-world access or make destructive changes |
Exam Traps
Practice Scenario
Production logs show an agent frequently calls get_customer when users ask about orders (e.g. 'check my order #12345'), instead of calling lookup_order. Both tools have minimal descriptions ('Retrieves customer information' / 'Retrieves order details') and accept similar identifier formats. What is the most effective first step to improve tool selection reliability?
Build Exercise
Design Tool Descriptions That Eliminate Misrouting
Difficulty: Beginner (1/4)
30 minutes
- Create two MCP tools with intentionally ambiguous descriptions (e.g. get_customer: Retrieves customer information and lookup_order: Retrieves order details)
Why: Reproducing a misrouting scenario first-hand builds intuition for why minimal descriptions fail. The exam tests your ability to identify ambiguous descriptions as the root cause of tool selection errors.
You should see: Two tool definitions registered with your MCP server, each having a single-sentence description that does not mention input formats, example queries, or boundaries.
- Test with 10 queries covering different user intents and log which tool the model selects for each
Why: Quantifying selection accuracy before and after description changes gives you concrete evidence of the impact. The exam expects you to know that description quality directly affects selection reliability.
You should see: A log showing at least 2-3 misrouted queries where the model selected get_customer for order-related queries or vice versa, demonstrating the ambiguity problem.
- Rewrite both descriptions to include: purpose, expected inputs with formats, example queries, edge cases, and explicit boundaries against the other tool
Why: This is the core exam skill — the lowest-effort, highest-leverage fix for misrouting. Production-grade descriptions include all five elements: purpose, inputs, examples, edge cases, and boundaries.
You should see: Each tool description is 3-5 sentences long, explicitly states accepted identifier formats, gives example queries, and includes a boundary statement like "Do NOT use for order-specific queries — use lookup_order for those."
- Re-run the same 10 queries and compare selection accuracy before and after
Why: Measuring improvement validates that description quality is the root cause. The exam expects you to understand that better descriptions produce measurably better selection without any architectural changes.
You should see: Selection accuracy improves to 9/10 or 10/10 correct, with previously misrouted queries now hitting the correct tool. A clear before/after comparison showing the improvement.
- Review your system prompt for keyword-sensitive instructions that could override the improved descriptions
Why: System prompt conflicts are a subtle failure mode the exam tests. Keywords like "always check customer details" can create unintended tool associations that override even well-written descriptions.
You should see: A list of any keyword-sensitive phrases in your system prompt that could trigger incorrect tool associations, along with rewritten versions that avoid the conflict.
Sources
- Claude Certified Architect Foundations Exam Guide — Domain 2, Task Statement 2.1 — Anthropic
- Tool use — Anthropic API Documentation — Anthropic
- Model Context Protocol Specification — Tools — Model Context Protocol
Appendix A — Build Exercise Step Hints
Progressive hints revealed by the "Stuck? Get a nudge" control on each step.
Step 1. Create two MCP tools with intentionally ambiguous descriptions (e.g. get_customer: Retrieves customer information and lookup_order: Retrieves order details)
Why: Reproducing a misrouting scenario first-hand builds intuition for why minimal descriptions fail. The exam tests your ability to identify ambiguous descriptions as the root cause of tool selection errors.
You should see: Two tool definitions registered with your MCP server, each having a single-sentence description that does not mention input formats, example queries, or boundaries.
Stuck? Get a nudge
Step 2. Test with 10 queries covering different user intents and log which tool the model selects for each
Why: Quantifying selection accuracy before and after description changes gives you concrete evidence of the impact. The exam expects you to know that description quality directly affects selection reliability.
You should see: A log showing at least 2-3 misrouted queries where the model selected get_customer for order-related queries or vice versa, demonstrating the ambiguity problem.
Stuck? Get a nudge
Step 3. Rewrite both descriptions to include: purpose, expected inputs with formats, example queries, edge cases, and explicit boundaries against the other tool
Why: This is the core exam skill — the lowest-effort, highest-leverage fix for misrouting. Production-grade descriptions include all five elements: purpose, inputs, examples, edge cases, and boundaries.
You should see: Each tool description is 3-5 sentences long, explicitly states accepted identifier formats, gives example queries, and includes a boundary statement like "Do NOT use for order-specific queries — use lookup_order for those."
Stuck? Get a nudge
Step 4. Re-run the same 10 queries and compare selection accuracy before and after
Why: Measuring improvement validates that description quality is the root cause. The exam expects you to understand that better descriptions produce measurably better selection without any architectural changes.
You should see: Selection accuracy improves to 9/10 or 10/10 correct, with previously misrouted queries now hitting the correct tool. A clear before/after comparison showing the improvement.
Stuck? Get a nudge
Step 5. Review your system prompt for keyword-sensitive instructions that could override the improved descriptions
Why: System prompt conflicts are a subtle failure mode the exam tests. Keywords like "always check customer details" can create unintended tool associations that override even well-written descriptions.
You should see: A list of any keyword-sensitive phrases in your system prompt that could trigger incorrect tool associations, along with rewritten versions that avoid the conflict.
Stuck? Get a nudge
Appendix B — Interactive Study Prompts
Two prompts to paste into Claude. B1 drills the judgement the exam actually measures; B3 reviews the code you wrote for the Build Exercise above. The exam simulator between them is the interactive quiz on this page.
B1. Concept Check — Discrimination Drill
You are examining me for the Claude Certified Architect – Foundations (CCAR-F) exam, Domain 2: Tool Design & MCP Integration (18% of the exam), Task Statement 2.1: Tool Interface Design. Use British English throughout.
What this exam actually measures. Not one item on the official exam asks what something is. Every item drops you into a production system that is already misbehaving, offers four defensible engineering responses, and asks which is best. The skill being tested is proportionality: fix the root cause with the cheapest instrument that gives the guarantee the situation demands. So do not quiz me on definitions. Make me choose between options that are both defensible, then attack whatever I chose.
How to run this session.
- One question at a time. Stop and wait. Never answer your own question, and never move on until I have committed.
- Never reveal which option is right before I commit to one.
- Do not praise me. A correct answer earns "Yes" and the next question. If I am right for the wrong reason, say so — that is the failure that costs marks on exam day.
- When I am wrong, quote the exact phrase in my answer that gave it away, correct it in one sentence, and move on. One correction at a time.
- If I write something fluent but empty, name it: "That is a restatement, not a reason."
- Set every scenario inside one of the exam's production contexts: the Customer Support Resolution Agent (Agent SDK, MCP tools
get_customer,lookup_order,process_refund,escalate_to_human), the Multi-Agent Research System (a coordinator delegating to web-search, document-analysis, synthesis and report-generation subagents), or Developer Productivity with Claude (an agent over an unfamiliar codebase usingRead,Write,Bash,Grep,Glob).
Session plan — about twelve questions.
Round 1 — Anchor (1 question). One concrete question to check I have actually read the material. If I cannot answer it, stop the session and tell me to read the lesson before continuing.
Round 2 — Discrimination (5 questions). Each one: describe a symptom in one of the contexts above, with a number or a log observation in it. Offer exactly two responses, both defensible. Ask me to pick one and justify it in a single sentence. Then argue the case for the option I rejected as strongly as you can, and ask whether I am holding or changing my answer. Only after I answer that, tell me which is right and why the other one is the more tempting trap.
Round 3 — Proportionality (2 questions). Take one symptom and run it twice with different stakes: once where the cost of an error is a wasted retry, once where it is an incorrect refund or a corrupted production branch. The right answer must change between the two. If I answer the same way both times without noticing the stakes moved, that is the finding — tell me.
Round 4 — Code review (3 questions). Present a colleague's confident proposal containing one of the trap errors listed below, written the way a teammate would write it in a pull request. Ask me what is wrong with it. Do not signal that anything is wrong.
Round 5 — Verdict. Rate me green, amber or red on each concept below. Name the single weakness most likely to cost me marks, and give me one specific next action: a section of this lesson to re-read, or a step of the Build Exercise to redo. If I am not ready for this task statement, say so plainly.
Concepts in scope
- Descriptions are the selection mechanism — the model picks a tool by reading its description, so a production-grade one states the tool's purpose, the input formats it accepts, example queries it handles well, its edge cases and limits, and an explicit boundary against the neighbouring tool.
- The misrouting problem — two tools whose descriptions overlap cannot be told apart:
get_customeras "Retrieves customer information" besidelookup_orderas "Retrieves order details" sends "check my order #12345" to the wrong tool. - Why expanding descriptions beats the alternatives — few-shot examples buy tokens rather than clarity, a routing classifier is infrastructure the symptom does not warrant, and consolidation is a genuine architectural option at far higher cost; the exam rewards the cheapest instrument that reaches the root cause.
- Tool splitting — a broad tool such as
analyze_documentbecomesextract_data_points,summarize_contentandverify_claim_against_source, each doing one narrow job under a defined input/output contract. - Tool renaming — renaming
analyze_contenttoextract_web_resultsand giving it a web-specific description removes the functional overlap at the interface, without touching the implementation underneath. - System prompt interactions — keyword-sensitive wording such as "always check customer details before proceeding" can build a tool association strong enough to override a well-written description, so the prompt gets reread after the descriptions change.
Trap errors to plant in Round 4
- Adding few-shot examples of correct tool selection to fix misrouting that minimal descriptions caused.
- Standing up a routing classifier in front of the toolkit as the first response to a selection error.
- Consolidating two confusable tools into one as the first move, before either description has been rewritten.
- Shipping rewritten descriptions without rereading the system prompt for keyword-sensitive instructions that contradict them.
Stay inside the material above. If I raise something outside it, tell me it is out of scope for this task statement and return to the drill. Begin with Round 1.
B2. Exam Simulator
Exam simulator
Question 1 of 10
Scenario · Customer Support Resolution Agent
Your support agent handles returns and billing disputes. Across a week of production logs, 18% of messages carrying an order number ("check my order #12345") are answered with a get_customer call rather than lookup_order. Both tool descriptions are one generic sentence and both accept free-text identifiers. What's the most effective first step to improve tool selection reliability?
B3. Build Coach — Code Review
The Build Exercise and its hint ladder are already on this page. This prompt is for the one thing the page cannot do: review the code you actually wrote.
You are a staff engineer reviewing my implementation of a build exercise for the Claude Certified Architect – Foundations exam, Domain 2, Task Statement 2.1: Tool Interface Design. Use British English throughout.
I am building a measured fix for tool misrouting: two MCP tools, get_customer and lookup_order, registered first with deliberately thin one-line descriptions, then run against a fixed set of ten queries with the selected tool logged for each, then rewritten to production-grade descriptions carrying purpose, accepted identifier formats, example queries, edge cases and an explicit boundary against the sibling tool — after which the same ten queries are re-run and scored, and the system prompt is reread for wording that could override the new descriptions.
It has to satisfy all of the following:
- Both tools are registered, and the first pass leaves each with a single generic sentence naming no input format, no example query and no boundary.
- The first run records the tool selected for every one of the ten queries, and at least two or three of them land on the wrong tool.
- Each rewritten description carries all five elements, including the identifier formats it accepts and a boundary sentence pointing at the other tool.
- The second run uses the identical ten queries scored against the same expected answers, and accuracy rises to nine or ten out of ten.
- The system prompt has been read for keyword-sensitive phrasing, with any offending phrase written out beside a replacement that does not bias selection.
How to review.
- Ask me to paste my code, including both versions of the descriptions and the two selection logs. If I have not pasted any, ask for it and nothing else. Do not write the implementation for me, do not offer a reference solution, and do not fill in a step I have skipped.
- Work through the criteria above in order. For each one, quote the line of my code that satisfies it, or say plainly that nothing does.
- Then hunt for the failure modes below. Each is a real production bug, not a style preference.
- Rank everything you find: (1) would fail in production, (2) would lose marks on the exam, (3) style. Give me the first item under (1) and then stop — wait for my fix before giving me the next one.
- If my code satisfies everything, do not congratulate me. Change the requirements — a third tool,
process_refund, joins the toolkit and overlaps with both of the others on anything mentioning an order — and make me redraw the boundaries. - If I ask you to just write it for me, refuse once and give me the smallest nudge that would unblock me instead.
Failure modes to probe
- A rewritten description that says what the tool does but never says what it is not for, leaving the model with no rule for choosing between the pair.
- Both descriptions rewritten to claim the same identifier space, so the genuinely ambiguous queries — "check my account", "where is my package?" — still split unpredictably.
- The discriminating sentence buried at the end of a long description, past the point where a client truncates it, so the boundary never reaches the model at all.
- Before and after runs that are not comparable — different queries, different expected answers, or a system prompt present in one run and absent from the other — so the improvement cannot be attributed to the descriptions.
- A system prompt still carrying an instruction such as "always check customer details before proceeding", which reassociates order queries with
get_customerand quietly cancels the rewrite.
Start by asking me for my code.