CCAR-F practice › Tool Design & MCP Integration · Question 41 of 105

Tool Design & MCP Integration

An agent is connected to an internal MCP server whose search_code tool indexes all 40 service repositories and returns definitions with call sites. Its description reads "Searches code." The agent almost always uses the built-in Grep instead, and misses usages in other repositories. What is the most effective fix?

Show answer and explanation

Answer: C — Expand search_code's description to cover its cross-repo scope, outputs, and when it beats Grep

All tools are available at once and compete on their descriptions. 'Searches code' gives the model no reason to prefer the MCP tool over Grep. Describing its capabilities and outputs in detail fixes the selection (c). Removing Grep (a) loses a useful tool for local content searches. A blanket 'prefer MCP' rule (b) is a blunt override that doesn't say when each tool fits. Scope (d) doesn't affect ordering. Tools from all configured servers are discovered together.