Claude Certified Architect - FoundationsCCAR-F Learning Guide
Domain 2 · Lesson 2.1 · 6 min read

Tool Descriptions and Boundaries

Exam taskDesign effective tool interfaces with clear descriptions and boundaries

Claude chooses tools by reading their descriptions, so a description must say what the tool does, what it accepts, what it returns and when to use it instead of its neighbours.

What you need to know

When Claude decides which tool to call, the description is the main thing it has to go on. The name helps, the schema helps, but the description carries the meaning. A one-line description ("Retrieves customer information") is the commonest reason an agent picks the wrong tool among similar ones.

What a good description contains

ElementExample for lookup_order
What it doesReturns one order's items, status, dates and payment
Inputs and their formatorder_id: the order number, 5 to 7 digits, with or without a leading #
What it returnsOrder status, item list, delivery date, refund eligibility
When to use itWhen the customer gives an order number or asks about a specific delivery
When not to use itTo find a customer by name or email: use get_customer
Edge casesReturns found: false for an unknown number; that is not an error
{"name": "lookup_order",
 "description": "Look up one order by its order number (5-7 digits, '#' optional). Returns status, items, delivery date and refund eligibility. Use when the customer names an order or a specific delivery. Do not use to find a customer: use get_customer with an email, phone or account number. An unknown number returns found=false, which is a valid result.",
 "input_schema": {"type": "object",
   "properties": {"order_id": {"type": "string", "pattern": "^#?[0-9]{5,7}$"}},
   "required": ["order_id"]}}

Overlap causes misrouting

Two tools with near-identical descriptions, such as analyze_content and analyze_document, force Claude to guess. The fixes are to rename and re-describe so each tool's purpose is distinct (for example, analyze_content becomes extract_web_results, described as working only on fetched web pages), or to split a generic tool.

Split generic tools into purpose-specific ones

A single analyze_document tool with a mode parameter for extraction, summarisation and claim verification asks Claude to pick the tool and the mode, and it often gets the mode wrong. Three tools with their own input and output contracts are easier to choose between:

  • extract_data_points(document_id, fields) returns structured values
  • summarize_content(document_id, length) returns a summary
  • verify_claim_against_source(claim, document_id) returns supported, contradicted or not found, with the passage

Constrained inputs help too. A free-text language parameter collects "python", "Python3" and "py"; an enum of allowed values does not.

The system prompt can override good descriptions

Tool selection is also shaped by the system prompt. An instruction like "always search before answering" can create an unintended association with any tool whose name contains "search", even when another tool fits better. When tools are misrouted despite good descriptions, review the system prompt for keyword-sensitive instructions.

In the exam

Expect logs showing two tools confused, a generic tool used in the wrong mode, or a capable tool ignored. Choose answers that rewrite descriptions with inputs, outputs and boundaries, rename to remove overlap, split generic tools, or constrain inputs with enums.

Check your understanding

Question 1

An agent often confuses get_customer and lookup_order, whose descriptions are one line each. What is the most effective first fix?

Show answer

Answer: D. Descriptions are the primary signal for tool selection. Stating what each accepts, returns, and when to use it rather than the other removes the ambiguity at its source.

Question 2

A generic analyze_document tool with a mode parameter is often called in the wrong mode. Which change helps most?

Show answer

Answer: A. Separate tools with defined contracts make the choice explicit. A mode flag hides three decisions inside one call.

Question 3 · select 2

Tools are misrouted even though every description is clear. What should you check next? Select TWO.

Show answer

Answer: A, C. System prompt wording can create unintended tool associations, and overlapping purposes leave Claude guessing even with long descriptions. Temperature and list order are not the levers the exam points to.

Apply it: Rewrite Lakeshore's graph tool

Exercise · about 15 minCase: Lakeshore Freight

Lakeshore's agent prefers Grep over the in-house portside-graph server, whose main tool is described as "Queries the code graph." Fix the tool interface.

  1. Write the new description for a find_callers tool on portside-graph: purpose, inputs, outputs, when to use it and when to use Grep instead.
  2. Decide whether to split a single query_graph(kind, symbol) tool that handles callers, implementations and dependencies. Justify your answer.
  3. Constrain one input with an enum or pattern, and say what goes wrong without it.
  4. Check the system prompt for an instruction that might push the agent towards Grep, and rewrite it.
Check your work
Show model answer

1. Description. "Find every caller of a Java or TypeScript symbol in Portside, including calls through interfaces, re-exports and dependency injection that text search misses. Input: symbol, a fully qualified name such as com.lakeshore.billing.InvoiceService.issue. Returns a list of call sites with file, line and the calling method. Use for 'who calls X' and impact questions. For finding a literal string, error message or log text, use Grep instead."

2. Split. Yes: find_callers, find_implementations and module_dependencies, each with its own input and output. The questions are different and so are the results; one tool with a kind flag invites the wrong kind.

3. Constraint. symbol must match a qualified-name pattern (dot-separated segments). Without it the agent passes bare names like issue, which match dozens of methods and return noise.

4. System prompt. "Always search the code with Grep before answering" becomes "Use portside-graph tools for structural questions (callers, implementations, dependencies) and Grep for literal text."

Sources

Go hands-on optional, needs a Claude API key

Runnable notebooks from Anthropic's Claude Cookbook that build the patterns in this lesson.