Domain 2 · 18% of exam · 11 of 60 items
Tool Design & MCP Integration practice questions
65 questions drawn from this domain’s 5 task statements, untimed and in order. Every option carries its own explanation, so a question you get right for the wrong reason still tells you something.
Worked exampleOne question, solved step by stepShow
Developer Productivity with Claude · Task 2.2
Your internal MCP server's create_ticket tool returns the text "Error: request failed" for every failure. The agent retries tickets rejected for a missing priority field until it hits its turn limit, yet gives up at once when the ticket system is briefly rate-limited. What change would most effectively fix this?
- A.Wrap create_ticket in a retry loop that repeats every failed call three times before it returns an error to the agent.
- B.Add a system-prompt line asking the agent to read error messages carefully and decide whether retrying makes sense.
- C.Return the upstream HTTP status code in the error text, so the agent can tell the different kinds of failure apart.
- D.Return structured errors flagged with isError, with a category, a retryable flag and what to change before trying again.
Working it through
- 1. What is being asked. How the tool should report failures so that the agent reacts correctly to each kind.
- 2. The constraint that decides it. Two failures that need opposite responses produce identical text. A validation error should not be retried unchanged, and a rate limit usually should. The agent behaves wrongly because it cannot tell them apart.
- 3. Predict before reading the options. Give the agent the information it needs: the type of failure, whether a retry can help, and what to fix. That points at structured error responses.
- 4. Rule out the near-misses.
- A — Retries the validation failures that can never succeed and burns calls, while still giving the agent nothing to act on afterwards.
- B — The agent is already reading the message, and the message says nothing useful. No amount of care extracts information that isn't there.
- C — Closer, but a bare status code leaves the agent to guess what 400 or 429 means for this tool and says nothing about which field to fix.
- 5. Answer: D. An error message is an input to the agent's next decision, so it should carry what that decision needs.
Domain 2 drill
Question 1 of 65
Scenario · Developer Productivity with Claude
Your agent has a get_file_history tool described as "Returns the commit history for a file." About a third of its calls fail because the agent passes absolute paths, while the tool expects paths relative to the repository root. After a failure the agent falls back to running git log through Bash, which is slower and floods its context. What change would most effectively address this?
Getting value out of these
Read every explanation, including on the questions you answered correctly. The exam is a judgement test: the distractors are all things a working engineer has actually tried, and the reason each one fails is the material. A right answer picked for the wrong reason will not survive a differently worded question.
When you get one wrong, the useful question is not what the right answer was but whether you reached for a workaround over a mechanism — a bigger context window instead of less context, an instruction in the prompt instead of a constraint in the orchestration layer. That pattern repeats across the whole exam, and noticing it is worth more than memorising any single item.
These are untimed on purpose. Pace is a separate skill and belongs in the timed mock exam, where 60 items in 120 minutes gives you roughly two minutes each on questions that take real reading.
Where these questions come from
Each task statement’s lesson explains the material the questions test.
All 65 questions in this set
The scenarios and decisions this drill covers. Answers and explanations appear only when you work through the questions above.
Show the question list
- Your agent has a get_file_history tool described as "Returns the commit history for a file." About a third of its calls fail because the agent passes absolute paths, while the tool expects paths relative to the repository root. After a failure the agent falls back to running git log through Bash, which is slower and floods its context. What change would most effectively address this?
- Your synthesis subagent's system prompt ends: "Always verify every claim before including it." It has a verify_claim tool, accurately described as an expensive check for disputed or surprising facts. Traces show it calling verify_claim on nearly every sentence, including textbook facts, and runs now cost four times as much. What change would most effectively address this?
- Your support agent has one tool, manage_order, with an action parameter that can be "lookup", "cancel" or "refund". In a week of logs, eleven conversations where the customer only asked about delivery status ended with manage_order called with action "cancel". Which approach should you take?
- Your agent connects to a GitHub MCP server and an internal documentation MCP server, and each exposes a tool named search. When asked how an internal API works, the agent searches GitHub issues about half the time and builds its answer from user complaints. What change would most effectively fix the routing?
- Your agent has get_customer, for an exact email or customer ID, and search_customers, for partial names. Both descriptions say only "Finds a customer." For some exact emails the agent calls search_customers, which can return several partial matches, and it then proceeds with the first one, occasionally on the wrong account. What change would most effectively address this?
- Your academic_search tool expects Boolean keyword queries such as ("heat pump" AND adoption) AND 2024. The web search subagent sends full questions like "How fast are heat pumps being adopted in Europe?", which return few or irrelevant papers. The tool's description says only "Searches academic papers." What change would most effectively improve results?
- lookup_order returns status codes from 1 to 7, and its description says only "Returns order status." The agent has started telling customers "Your order is in status 4", and it treats status 6 (returned to sender) as delivered. What change would most effectively fix this?
- Your agent's run_migration tool is described as "Runs a database migration." It fails with an error when the migration has already been applied, and the agent responds by running it again with different flags. A migration_status tool exists, but the agent rarely calls it first. What change would most effectively fix this?
- Your document-analysis subagent has analyze_content, meant for scraped web pages, and analyze_document, meant for PDFs in the internal library. Both are described as "Analyses content and returns key points." Traces show the wrong one chosen in about 30% of calls, which truncates long reports. What change would most effectively fix this?
- After misrouting problems, a teammate rewrote every tool description in your developer assistant to around 1,500 words, covering every edge case they could think of. Tool selection got slightly worse, each request now carries 20,000 extra tokens, and the key differences between similar tools are hard to find. What should you do?
- escalate_to_human is described as "Escalates the conversation to a human agent." The agent now escalates most refund questions, including routine ones that process_refund handles within policy, and the human queue has tripled. What change would most effectively address this?
- Your agent has find_symbol, which locates where a function or class is defined, and search_text, which matches strings anywhere including comments. Both descriptions say "Searches the codebase." The agent uses search_text for definitions and drowns in comment matches. Which two changes would most improve selection? (Select two.)
- Your find_callers tool was changed to return at most 50 results per call, with a next_cursor field for more. Its description was not updated. When asked whether a function is safe to change, the agent now reports "50 callers" for widely used functions and misses the rest. What change would most effectively fix this?
- A report states that "no peer-reviewed studies exist" on a topic. Tracing the run, you find the academic database returned a 503, and your search tool caught the exception and returned an empty list, exactly as it does when a query genuinely finds nothing. The coordinator took the empty list at face value. What change would most effectively prevent this?
- Customers can't change a delivery address within 24 hours of dispatch. When they try, update_address returns isError with the text "Error 4012". Your agent retries the call three times, then escalates to a human, who explains the policy and closes the ticket. These escalations make up 6% of your queue. What change would most effectively address this?
- Your coordinator delegates test runs to a subagent. Package installs in your CI sandbox time out about once in every ten runs, and the subagent reports every timeout straight to the coordinator, which then abandons the task. Most of those installs succeed if simply tried again a minute later. Which approach should you take?
- Your web search subagent spends three minutes on a subtopic, runs six queries, gathers four usable sources, then hits a rate limit it can't wait out. It returns "Search failed" to the coordinator, which delegates the same subtopic to a fresh subagent that repeats all six queries. What change would most effectively address this?
- Your agent deploys preview builds with a deploy_preview tool. When the team's monthly build minutes run out, the tool returns isError with "Deploy failed", and the agent retries it ten times per task, each attempt queuing for two minutes before failing. The quota resets on the first of the month. What change would most effectively address this?
- Your get_account tool refuses VIP accounts unless the agent holds the tier-2 role, returning "Request failed". The agent retries the call several times, then tells the customer the system is down. Policy says VIP queries should go to the tier-2 team. What change would most effectively fix this?
- Your web search tool rejects queries longer than 256 characters with "Invalid request". The web search subagent writes long, detailed queries, retries the identical query several times when rejected, then reports the subtopic as having no sources. What change would most effectively fix this?
- Your test-runner MCP tool returns "ERROR: npm not found on PATH" as ordinary content, with isError false. The coding agent read it as test output, reported "0 tests failed" in its summary, and opened a pull request. What change would most effectively prevent this?
- Your get_order_history tool fails in three ways: timeouts, malformed customer IDs and accounts the agent may not access. Today every failure returns "Something went wrong", and the agent retries malformed IDs repeatedly while giving up after a single timeout. What change to the tool's error responses would most effectively fix both behaviours?
- Your document-fetch subagent retries every failure up to five times with backoff before reporting to the coordinator. Logs show that 404 "document not found" errors are retried five times, adding about 90 seconds each, while the coordinator could have switched to another source immediately. What change would most effectively fix this?
- Your deploy tool returns isError true with errorCategory "transient" and isRetryable true when the build queue is full. The agent retries immediately in a tight loop, 20 times in a few seconds, which keeps the queue full and gets the account rate-limited. What change would most effectively fix this?
- Customers may receive at most three refunds a month. When the limit is reached, process_refund returns "Refund limit reached." The agent then offers store credit through issue_credit instead, which finance says bypasses the rule they intended. What change to the error would most effectively prevent this?
- Your team's git MCP server throws an exception when the git binary is missing on a developer's machine. The client shows only a generic protocol error, the agent assumes the server is broken, and it abandons the task instead of telling the developer what to install. What change would most effectively fix this?
- To save a future sprint, your team gave the support agent internal admin tools alongside its usual four, including adjust_credit_limit and merge_accounts, "in case they're ever needed." This month the agent raised three customers' credit limits while resolving billing disputes, which isn't part of support's role. Which approach should you take?
- Your synthesis subagent was given the full web_search tool so it could "fill small gaps" while writing. Reviewers now find reports citing blog posts and vendor pages that the search and analysis subagents never vetted, and synthesis runs have doubled in length. What change would most effectively address this?
- A nightly CI step asks Claude to triage each failed test by calling either file_issue or mark_flaky; either is a valid outcome. About one run in fifteen, Claude replies with an explanation in prose instead, and the pipeline step that parses tool calls breaks. The model you run supports forced tool use. What change would most effectively address this?
- To answer delivery questions, your support agent was given a generic http_request tool that can call any internal URL, and it uses it to check carrier tracking. A security review finds one transcript where it called the refunds service directly through http_request, bypassing process_refund and its verification gate. Which approach should you take?
- Your documentation subagent writes API reference pages and needs to check a function's current signature several times per page. Each check goes back to the coordinator, which delegates to the code-search subagent and relays the answer, so a page now takes twelve minutes. Deeper questions, such as tracing a behaviour change, are rare. What change would most effectively address this?
- Your single research agent has 18 tools: four for search, six for documents, five for citations and three for reports. It picks the wrong tool in about one call in six, often a document tool when it should search. Each group of tools is used at a different stage of the research. What change would most effectively improve reliability?
- Every support conversation must begin with classify_request, which tags the intent and routes later steps. The prompt says so, but about 4% of conversations start with lookup_order instead, and those are routed wrongly. After that first call the agent should choose freely. The model supports forced tool use. What change would most effectively guarantee this?
- Your internal Q&A assistant answers developer questions, and many need no tool, such as explaining a language feature. To "make sure the tools get used", a teammate set tool_choice to any. Simple questions now trigger pointless repository searches and take three times as long. What should you change?
- Your code-review subagent was given Write and Edit "so it can fix trivial issues while reviewing". It now rewrites code during reviews, sometimes in files outside the pull request, and two reviews introduced bugs nobody noticed because the diff came from the reviewer. What change would most effectively address this?
- To cut tool-selection errors, a teammate proposes giving your code-review subagent only Read, removing Grep and Glob as well. Reviewers note that good reviews often depend on finding a changed function's callers and related tests elsewhere in the repository. What should you recommend?
- You are adding a citation-checking subagent that confirms each report claim against its cited source. A first version given every tool started researching new claims and rewriting paragraphs, and reports took twice as long. Which two changes should you make to its design? (Select two.)
- Your document-analysis subagent was given fetch_url so it could load pages cited in internal reports. It now also fetches arbitrary blogs and search results, and some low-quality sources reach the final report. It legitimately needs only documents in the company's approved research library. What change would most effectively address this?
- Your support agent connects to the company's admin MCP server, which exposes 30 tools, from account merges to permission changes. The agent only needs get_customer, lookup_order and update_address, yet it sometimes calls admin tools while resolving tickets. Other teams use the same server. What change would most effectively address this?
- Your research team wants its agents to read pages from the company's Confluence wiki. A developer has scoped two weeks to build a custom MCP server for it. A maintained community Confluence MCP server already exists, and the team's only unusual need is a server for its internal citation database. Which approach should you take?
- Your support agent answers policy questions with a search_kb tool over 300 help articles. Traces show it calling search_kb five or six times per question with guessed keywords, just to discover which articles exist, before it finds the right one. The article list changes only when the help team publishes. What change would most effectively address this?
- Your repository's .mcp.json now lists nine MCP servers, because developers add every server they try. Agents in this repository load about 140 tools at startup, and tool-selection mistakes rose sharply after the last few were added. Most developers use only the GitHub and issue-tracker servers. Which approach should you take?
- Your team's .mcp.json configures a Sentry MCP server, and each developer authenticates with their own Sentry token. Developers keep personal edited copies of .mcp.json with their tokens pasted in, and twice this month one of those copies was committed. What change would most effectively address this?
- Your research coordinator has an internal MCP tool, query_findings_db, that returns peer-reviewed findings with study sizes and confidence intervals. Its description reads "Queries the findings database." Traces show the coordinator almost always using the built-in WebFetch on public pages instead, and reports cite secondary summaries. What change would most effectively address this?
- Your repository's .mcp.json lists both a Jira server and a Linear server, because the team moved to Linear last quarter and nobody removed the old entry. The agent now files about a third of new issues in Jira, which nobody reads. Both servers' create_issue tools have reasonable descriptions. What change would most effectively fix this?
- Your team's .mcp.json points the internal-API MCP server at ${INTERNAL_API_URL}. Two of eight developers work against a staging mirror; the other six want production and keep forgetting to export the variable, so their sessions fail to connect. You want one committed file that works for everyone. What should you change?
- Your research team exposes its internal source catalogue, a list of approved databases with descriptions, as an MCP resource, which cut exploratory calls sharply. A developer now proposes exposing the live full-text search over those databases as a resource too, "for consistency". What should you recommend?
- A developer configured the team's code-index MCP server in their own ~/.claude.json while evaluating it. The whole team now relies on it, but new joiners don't get it, and two people configured it with different settings. What change would most effectively fix this?
- Your research findings database scores studies by quality and has domain rules about which results may be combined. A teammate connected a generic community SQL server to it, and the agent now writes its own queries, mixing preprints with peer-reviewed results and getting the weighting wrong. What change would most effectively address this?
- Your support agent can Read raw policy files from a shared folder, and it also has a policy MCP server whose get_policy tool returns the current version of a policy with its effective date. The tool is described as "Policy access." The agent mostly uses Read, and it has quoted superseded policies twice this month. What change would most effectively fix this?
- A new developer's Claude Code session loads about 160 tools, mostly from experimental servers that teammates added to the shared .mcp.json. Meanwhile the team's issue-tracker server, which everyone uses, is configured only in a senior developer's ~/.claude.json. Which two changes should you make? (Select two.)
- Your support agent connects to a payments MCP server, which exposes refund_payment, and a help-desk MCP server, which exposes refund_macro that only posts a refund message template. Both are offered together, and the agent sometimes uses refund_macro and tells customers their refund is done when no money moved. What change would most effectively fix this?
- Your document-analysis subagent must review every quarterly report from 2024 in a folder of 900 converted reports named like reports/2024-Q3-acme.md. It currently runs Grep for "2024" across the folder, which matches hundreds of older reports that merely mention the year, and it then reads most of them. Which approach should you take?
- Your support agent has Read and Grep over a folder of 60 policy documents. When a customer asks about returning an item bought abroad, the agent opens policy files one at a time with Read until it finds the clause on international returns, often reading ten or more files first. What change would most effectively address this?
- Requests to /v2/invoices return a 500 with the message "currency mismatch", and you ask your agent to find the cause in a large, unfamiliar service. Its plan is to Glob every TypeScript file and Read them in directory order until something looks relevant. Which approach should you take?
- Before deleting calculateTax, you ask your agent for every caller. It Greps for calculateTax and finds four. But several barrel files re-export it under other names, for example export { calculateTax as computeVat }, and callers elsewhere use those aliases. What's the most effective way to find every caller?
- Your report-generation subagent fixes a single wrong citation in a 3,000-line report by rewriting the whole file with Write. In two runs this month the rewritten file came back with an appendix and several tables silently missing. Each citation it corrects appears exactly once in the report. What change would most effectively address this?
- Your agent must change one of six identical generated blocks in a file. Each block ends with the same return null; and has identical lines around it, so Edit keeps failing because its target text is not unique, and the agent retries the same Edit repeatedly. Which approach should it take?
- Your support agent Greps a 2,000-file knowledge base for answers. The base contains policies/current/ and policies/archive/, and results for "return window" now mix current and superseded policies, so the agent quoted a 14-day window that changed to 30 days last year. What change would most effectively fix this?
- Your analysis subagent must report how many of 900 stored reports mention "supply shortage" and which ones. It runs Grep in its default mode, which returns every matching line with context, and thousands of lines flood its context before it can answer. Which approach should it take?
- Before removing processRefundV1, you ask your agent for its callers. Grep for processRefundV1( finds none, so the agent proposes deleting it. The service actually registers handlers by name, as in handlers["processRefundV1"], and dispatches on a string from the request. What should the agent do before concluding the function is unused?
- Your agent must rename a config key in 12 files where it appears once per file, and in one more file where it appears three times on identical lines that each need changing. Which two approaches should it use? (Select two.)
- Your agent's Edit to change timeout = 30 fails because that line appears in four functions. It falls straight back to reading the 1,200-line file and writing it out in full, and twice the rewrite dropped an unrelated change a teammate had just made. The four functions have different names. Which approach should it take?
- Your analysis subagent must extract one table from a 400-page annual report in Markdown. It currently Reads the whole file, which fills most of its context before the analysis starts. The table's caption begins "Table 14: Segment revenue". Which approach should it take?
- Your document-analysis subagent explores a downloaded corpus with Bash commands such as find . -name "*.md", cat on whole files, and grep -r. Outputs are huge, some commands hang on binary files, and every run needs extra permission prompts. Read, Grep and Glob are available. What change would most effectively improve this?