Skip to content
CCAR-F Prep

Domain 2 · 18% of exam

Tool Design & MCP Integration flashcards

109 cards distilled from the six task statements in this domain, one question per fact the exam can actually ask for. Anything you mark “Again” comes back at the end of the round, and again tomorrow — a card you keep getting right moves up a box and goes quiet for longer each time, up to a fortnight.

Use these once you have read the lessons — they test recall, not understanding. For the reasoning behind any answer, the domain curriculum explains it, and the cheat sheet condenses it.

Loading your deck…

Every card in this deck

The whole deck as a list, for scanning or printing.

What is the primary mechanism LLMs use for tool selection?
Tool descriptions. The model reads them to decide which tool to call, so two tools with minimal, near-identical descriptions are genuinely indistinguishable to it — no amount of surrounding metadata compensates.
What regex must a Messages API client tool's name match?
^[a-zA-Z0-9_-]{1,128}$
What three fields are required in a client tool definition?
name, description, input_schema (input_examples is optional, and each example must validate against input_schema).
What optional fields does an MCP tool definition add beyond name/description/inputSchema?
title, icons, outputSchema, annotations.
How does an MCP client discover and execute tools?
tools/list to discover; tools/call to execute.
What is Anthropic's single most important factor in tool-use performance?
Extremely detailed tool descriptions.
What are Claude Code's default cut-off limits for MCP tool descriptions and server instructions?
4,096 characters for server instructions and upfront tool descriptions; 16,384 for a tool loaded through tool search (2,048 before v2.1.296). Put critical details near the start.
What does Claude Code's tool search do by default?
Tool search is on by default: MCP tools are deferred and discovered on demand, and only tool names and server instructions load at session start.
What are the five elements of a production-grade tool description?
Purpose, expected inputs with formats, example queries, edge cases/limitations, explicit boundaries vs similar tools.
A tool is misrouted because two descriptions overlap. What's the correct first fix?
Expand/improve the descriptions — not few-shot examples, not a routing classifier, not tool consolidation.
Instead of list_users, list_events, create_event, what single workflow tool should you build?
schedule_event — a consolidated workflow tool, not an API wrapper.
What two forms of namespacing does Anthropic's tool-writing guidance describe?
By service (asana_search) and by resource (asana_projects_search).
What mistake-proofing example did Anthropic give for tool schemas?
Requiring absolute filepaths (instead of allowing relative) eliminated the model's path errors entirely.
What evidence shows tool description quality is measurable, not just stylistic?
SWE-bench Verified SOTA followed description refinements; a tool-testing agent's rewritten descriptions cut future task completion time by 40%.
What are MCP's two error-reporting mechanisms?
Protocol errors (standard JSON-RPC: unknown tool, malformed request, server error) vs tool execution errors (isError: true inside a successful result, including input validation errors).
What does isError: true signal to the agent?
Tool execution failed — the model should reason about recovery, not treat the text as a normal successful result.
What's the Messages API tool_result field equivalent to MCP's isError?
is_error (optional boolean) on the tool_result block; the MCP connector's mcp_tool_result carries the same field.
What field carries structured JSON tool output in MCP?
structuredContent — a JSON value (any type in revision 2026-07-28); the tool SHOULD also serialise it into a text block for backwards compatibility.
If a tool declares an outputSchema, what's the server's obligation?
MUST provide structured results conforming to it; the client SHOULD validate against it.
Name the exam guide's four error categories and whether each is retryable.
Transient (retry after delay) · validation (fix input, then call again) · business (never retry; explain, alternative path) · permission (never retry, escalate).
What question does isRetryable answer?
"Can a retry ever succeed" — not "will the identical request succeed unchanged."
How do you structurally distinguish an access failure from a valid empty result?
Access failure = isError: true (couldn't reach data); valid empty result = isError: false with resultCount: 0 (reached data, found nothing).
What does the MCP spec say about human oversight of tool invocations?
There SHOULD always be a human in the loop with the ability to deny tool invocations.
Claude's tool call is invalid (e.g. a missing required parameter). How do you report it, and what follows?
A tool_result with is_error: true and a clear message; Claude may call the tool again with the information filled in. The docs promise no fixed number of attempts, so cap retries in your loop.
What does strict: true on a tool definition prevent, and what can it not prevent?
It prevents missing parameters and type mismatches in tool inputs. It cannot catch a well-typed but wrong value (e.g. "order-abc" as an order ID); only your tool's validation error can.
In the Agent SDK, what happens when a custom tool handler throws an uncaught exception?
The SDK's in-process MCP server converts it to an error result carrying the raw exception message — the agent loop is not stopped. Catch it yourself to compose a better recovery message.
In multi-agent error propagation, what should a subagent do first with a transient failure?
Attempt local recovery; only propagate errors it cannot resolve, along with partial results and what was attempted.
What are the four documented tool_choice types?
auto, any, tool, none.
Which tool_choice type is the default when tools are provided?
auto.
Which tool_choice type is the default when no tools are provided?
none.
What JSON shape forces a specific tool?
{"type": "tool", "name": "..."}
What visible model behaviour does forcing tool_choice to any/tool suppress?
Natural-language commentary before the tool_use block — the API makes the response start with a tool call, even if you ask for an explanation.
Which tool_choice types are compatible with manual extended thinking?
Only auto and none — any and tool produce an error alongside manual extended thinking.
Where does disable_parallel_tool_use live in the request?
Inside the tool_choice object — it is not a top-level request parameter.
With tool_choice auto + disable_parallel_tool_use: true, how many tools can Claude call?
At most one — Claude may still return plain text with no tool call.
With tool_choice any/tool + disable_parallel_tool_use: true, how many tools does Claude call?
Exactly one (on models that accept any/tool).
What happens to prompt caching when you change tool_choice between turns?
Cached message blocks are invalidated (must be reprocessed); tool definitions and the system prompt remain cached.
What is the optimal number of tools per agent?
4-5 tools, scoped to that agent's specific role (the exam guide's figure, set against 18).
What is a "scoped cross-role tool"?
A constrained version of another role's capability given directly to an agent for its high-frequency simple case; complex cases still route through the coordinator.
What failure mode does Anthropic's context-engineering guidance name for bloated tool sets?
Tools covering too much overlapping functionality create ambiguous decision points about which tool to use.
What command adds a remote HTTP MCP server?
claude mcp add --transport http <name> <url>
What command shape adds a local stdio MCP server?
claude mcp add [options] <name> -- <command> [args...] — the -- separator is required.
What command adds a server directly from a JSON definition?
claude mcp add-json <name> '<json>'
What are the three MCP server configuration scopes?
local (default), project, user.
Where is a local-scoped MCP server stored?
~/.claude.json, nested under that project's path — loads only in that project, private to you.
Where is a project-scoped MCP server stored?
.mcp.json in the project root — version-controlled and shared with the team.
Where is a user-scoped MCP server stored?
~/.claude.json — available across all of your projects.
Which MCP scope does claude mcp add use by default, and where is it stored?
local — ~/.claude.json, under that project's path; private to you and loaded only in this project.
What is the MCP server scope precedence order when a name collides?
local > project > user > plugin-provided servers > claude.ai connectors — the whole entry from the winning source is used, fields are never merged. A managedMcpServers server ranks above all.
How does MCP "local scope" differ from general "local settings"?
MCP local scope lives in ~/.claude.json (home directory); general local settings live in .claude/settings.local.json (project directory).
What are the two environment-variable expansion forms in .mcp.json?
${VAR} and ${VAR:-default}.
In which .mcp.json fields does variable expansion work?
command, args, env, url, headers.
What are the two standard MCP transports per the spec?
stdio and Streamable HTTP (spec revision 2026-07-28); custom transports are allowed.
What MCP transport is deprecated in Claude Code?
Standalone SSE — use HTTP servers instead where available.
What alias does the .mcp.json "type" field accept for "http"?
"streamable-http" — so configs copied from vendor docs work unmodified.
What's the Agent SDK's transport-choice heuristic?
Command to run → stdio; URL → HTTP or SSE; tools built in your own code → SDK MCP server.
How do you check MCP server status inside a Claude Code session?
/mcp
What must happen before Claude Code uses a project-scoped server from .mcp.json?
In interactive sessions it prompts for approval; reset those choices with claude mcp reset-project-choices. claude -p and Agent SDK runs load them without asking.
How does Claude Code authenticate to a remote MCP server requiring OAuth?
Via /mcp or claude mcp login <name>; tokens are stored securely and refreshed automatically.
How do you reference an MCP resource directly in Claude Code?
@server:protocol://resource/path — it's fetched and attached automatically.
What format do MCP prompts take as Claude Code slash commands?
Listed as /servername:promptname (MCP); typing /mcp__servername__promptname also runs it.
What are Claude Code's MCP tool output token limits?
Warning above 10,000 tokens; default maximum 25,000 (MAX_MCP_OUTPUT_TOKENS). Over-limit output is saved to a file, not truncated; text over 50,000 characters is saved to a file regardless.
What is the MCP tool naming pattern?
mcp__<server-name>__<tool-name>, e.g. mcp__github__list_issues.
When should you build a custom MCP server instead of using a community one?
Only when the team has specific workflows or proprietary systems that community servers can't handle.
What does Grep search?
File contents — patterns like function calls, error messages, import statements.
What does Glob search?
File paths, by naming pattern — e.g. **/*.test.tsx.
What is Edit's failure mode, and what safety purpose does it serve?
Fails when old_string matches more than one location — prevents accidentally changing text you didn't mean to touch.
Edit reports a non-unique match. What does the exam guide name as the fallback, and what do current docs do first?
Guide: Read + Write (Read the full file, Write it back). Docs: widen old_string with surrounding context, or set replace_all: true.
What's the correct incremental codebase-exploration order?
Grep for entry points → Read to trace flows → Grep again for wrappers/barrels → Read only what's justified by prior findings.
Beyond Read/Write/Edit/Bash/Grep/Glob, which two built-in tools does the Agent SDK reference name explicitly?
WebFetch (fetches external content) and Agent (spawns subagents). The docs list them followed by "and others" — treat the roster as open-ended, not a closed set of six.
What does the SDK's tools option control?
Which built-ins are available to the agent; tools: [] removes all built-ins (MCP tools are unaffected).
What tool spawns subagents, and what was it previously called?
Agent — renamed from Task in Claude Code v2.1.63. The exam guide requires allowedTools to include it (as "Task"); current docs say Agent calls need no approval.
What's the difference between --allowedTools and --tools?
--allowedTools skips the permission prompt for listed tools; --tools restricts which tools are available at all.
In --disallowedTools, what does a bare tool name do versus a scoped rule?
A bare name (e.g. "Edit") removes the tool from context entirely; a scoped rule (e.g. Bash(rm *)) leaves the tool available and denies only matching calls.
Why does the trailing space matter in Bash(git diff *)?
Without it, Bash(git diff*) would also wrongly match unrelated commands like git diff-index.
What does a WebFetch(domain:*.example.com) rule match?
Any subdomain at any depth — but not the apex domain example.com itself.
How do MCP permission rules scope access to a server's tools?
mcp__server (whole server) · mcp__server__* (wildcard, also whole server) · mcp__server__tool (one specific tool).
In the deprecated-function-plus-tests scenario, what does each step in Grep→Glob→Grep find?
Grep finds direct callers by content → Glob finds their sibling test files by naming convention → Grep again catches indirect consumers through wrapper/barrel names.
Which tool-schema field is snake_case in the Messages API and camelCase in MCP?
input_schema (API) vs inputSchema (MCP). outputSchema, title and annotations exist only in MCP.
What are MCP's four tool annotation hints, and how far should a client trust them?
readOnlyHint, destructiveHint, idempotentHint, openWorldHint — untrusted unless the server is trusted.
Which element of a tool description is most often omitted?
The negative boundary: when not to use the tool, and which sibling tool to use instead.
When do you split overlapping tools, and when do you consolidate them?
Different input/output contracts: split. Same contract, different verb: one tool with an action parameter. Similar names, different jobs: rename.
Descriptions were rewritten and are good, yet one tool is still systematically over-selected. What do you check?
The system prompt, for words that name or evoke that tool; reword them neutrally and measure again.
How long does Anthropic's API documentation say a tool description should be?
At least 3–4 sentences, more if the tool is complex.
In the current MCP spec, are invalid tool arguments a protocol error or a tool execution error?
A tool execution error (isError: true). The 2025-06-18 revision listed them as protocol errors.
Which MCP errors SHOULD a client pass to the model, and which MAY it?
SHOULD pass tool execution errors (to enable self-correction); MAY pass protocol errors.
Are errorCategory and isRetryable MCP protocol fields?
No — they are the exam guide's application convention. Carry them as JSON in the text block and/or structuredContent.
What four things should a propagated error carry to the coordinator?
Failure type, what was attempted, partial results, and alternative approaches.
What goes wrong in each direction when access failures and empty results are confused?
Empty reported as error: wasted retries and false escalation. Failure reported as empty: the agent proceeds confidently on missing data.
What isRetryable value does a validation error carry?
The guide assigns none (the lesson uses true). Answer by behaviour: fix the input and call again; never resend unchanged.
On the newest models (e.g. Opus 5.5, Sonnet 5.5), what happens with tool_choice any or tool — and what is the exam answer?
They return a 400 error; docs suggest auto with strict tool use, or structured outputs. Exam answer unchanged: any to guarantee a call, forced for a specific first tool.
How long does a tool_choice setting last?
One request. Force the first call, then release to auto; forcing every turn loops until the turn cap.
Name three things tool_choice cannot do, and what does each instead.
Enforce a session-wide rule (a hook); validate arguments (strict: true); make a tool exist (give the agent the tool).
On a model with adaptive thinking that accepts forced tool use, what happens to thinking on a forced call?
It is skipped — the response starts with the tool call and has no thinking block.
What does an Agent SDK subagent get if its AgentDefinition omits tools?
Every tool available to subagents. A tool left out of the list is simply absent, with no prompt or error.
Sample Q9: 85% simple fact-checks, 2-3 round trips, +40% latency. What's the answer?
A scoped verify_fact on the synthesis agent for simple lookups; complex verifications still go through the coordinator.
Exam answer: when are tools from all configured MCP servers discovered?
At connection time, all available simultaneously, no per-server activation (current Claude Code defers definitions via tool search).
What happens when a ${VAR} in .mcp.json is unset and has no default?
The config still loads; claude mcp list and /mcp show a warning, and the literal ${VAR} text is used.
Which .mcp.json field generates auth headers at connection time?
headersHelper — a command Claude Code runs when connecting, merging its output into the headers.
How do you make a CI run load only the MCP servers you pass?
--strict-mcp-config together with --mcp-config.
When is an MCP resource the answer rather than a tool?
When the agent needs visibility into what exists (catalogue, docs tree, schema) and is spending exploratory calls; tools are for actions.
Is building a custom Jira MCP server "so we control the tool descriptions" correct?
No — disproportionate, and not a team-specific workflow. Adopt the community server.
How is a tool from a plugin-bundled MCP server named?
mcp__plugin_<plugin-name>_<server-name>__<tool-name>
The same server name is defined in two scopes with different endpoints. What signals it?
A conflict warning in claude mcp list and /mcp; the connection itself raises no error.
Are Grep and Glob in Claude Code's default tool set today?
Not on macOS, Linux or WSL (Claude searches with find/grep via Bash); naming either in --tools or --allowedTools restores both. Exam answer unchanged.
Edit reports zero matches rather than several. What's the fix?
Correct the old_string text — it must match exactly, whitespace included. Widening the anchor does not help.
An audit found 3 of 40 call sites. What was skipped?
Enumerating exported and aliased names (export { x as y }, export * from, import * as ns) before Grepping for each.
Name the two independent reasons reading every file upfront fails.
Context exhaustion, and attention dilution across irrelevant files.
Which of Grep and Glob respects .gitignore, and which caps results at 100?
Grep respects .gitignore; Glob caps results at 100 files, sorted by modification time.