CCAR-F practice › Tool Design & MCP Integration · Question 43 of 105
Tool Design & MCP Integration
Asked to explain how a checkout request is processed in an unfamiliar 600-file service, an agent starts by reading every file in src/. It runs low on context before reaching the payment code. What approach should it use instead?
Show answer and explanation
Answer: C — Grep for the checkout route handler, Read it, then follow its imports one module at a time
Incremental exploration starts with Grep to find the entry point, then uses Read to follow imports and trace the flow, reading only files on the relevant path (c). File-name matching (a) is a guess that misses code without 'checkout' in the path and still reads files upfront. Summarizing every file (b) and reading one concatenated dump (d) both still load the whole codebase.
Keep going
More Tool Design & MCP Integration questions
- An agent needs to change one timeout value in a YAML file that has three identical…
- Before deprecating formatCurrency, an agent Greps for that name and finds 6 callers. A…
- In a research system, the analysis subagent has two tools: analyze_content, described as…
- A support agent has a tool whose entire description is "Queries the v2 inventory…
- A developer productivity agent has a web_search tool and an MCP code_search tool. Both…