CCAR-F practice › Tool Design & MCP Integration · Question 45 of 105
Tool Design & MCP Integration
Before deprecating formatCurrency, an agent Greps for that name and finds 6 callers. A teammate points out that a money module re-exports it as formatAmount, and a UI helper wraps that as displayPrice. What is the best way to find every caller?
Show answer and explanation
Answer: D — Read the wrapper modules to list every exported name, then Grep for each name
Callers that use an alias don't contain the original name. Collect every name the function is exported or wrapped under, then search for each across the codebase (d). Case-insensitive matching (a) still looks for the same name. Glob (b) matches paths, not the code inside files. Reading a whole layer (c) is upfront reading that may still miss callers elsewhere.
Keep going
More Tool Design & MCP Integration questions
- 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…
- A support agent's lookup_order tool wraps its database call in a catch-all that returns…
- An MCP tool calling an external catalog API sometimes gets "item not found" and…