Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Anthropic CCAR-F Exam - Topic 5 Question 5 Discussion

You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.After integrating a local MCP server providing code analysis tools (analyze_dependencies, find_dead_code, calculate_complexity), you verify the server is healthy and tools appear in the tools/list response. However, you observe that the agent consistently uses Grep to search for import statements instead of calling analyze_dependencies---even when users explicitly ask about ''code dependencies.'' Examining tool definitions reveals:MCP analyze_dependencies -- ''Analyzes dependency graph''Built-in Grep -- ''Search file contents for a pattern using regular expressions. Returns matching lines with line numbers and surrounding context.''What's the most effective approach to improve the agent's selection of MCP tools?
B) Expand MCP tool descriptions to detail capabilities and outputs---e.g., ''Builds dependency graph showing direct imports, transitive dependencies, and cycles.''
A) Add routing instructions to the system prompt specifying that dependency-related questions should use MCP tools rather than Grep.
C) Remove Grep from available tools when the MCP server is connected to eliminate functional overlap.
D) Split analyze_dependencies into granular tools (list_imports, resolve_transitive_deps, detect_circular_deps) so each has a focused purpose less likely to overlap with Grep.

Anthropic CCAR-F Exam - Topic 5 Question 5 Discussion

Actual exam question for Anthropic's CCAR-F exam
Question #: 5
Topic #: 5
[All CCAR-F Questions]

You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.

After integrating a local MCP server providing code analysis tools (analyze_dependencies, find_dead_code, calculate_complexity), you verify the server is healthy and tools appear in the tools/list response. However, you observe that the agent consistently uses Grep to search for import statements instead of calling analyze_dependencies---even when users explicitly ask about ''code dependencies.'' Examining tool definitions reveals:

MCP analyze_dependencies -- ''Analyzes dependency graph''

Built-in Grep -- ''Search file contents for a pattern using regular expressions. Returns matching lines with line numbers and surrounding context.''

What's the most effective approach to improve the agent's selection of MCP tools?

Show Suggested Answer Hide Answer
Suggested Answer: B

Claude selects tools principally from their names, descriptions, parameter schemas, and the task context. The current description---''Analyzes dependency graph''---does not explain why the MCP tool is superior to a familiar text search. It omits the tool's scope, the circumstances in which it should be selected, and the structured information it returns.

Anthropic identifies detailed descriptions as the most important factor in tool-use performance. A strong description should state what the tool does, when it should and should not be used, what its parameters mean, and any limitations. Anthropic recommends several sentences for complex tools rather than a short generic label. (https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/implement-tool-use) The MCP connector guidance likewise states that Claude selects among available tools using their names and descriptions and that clear, specific descriptions improve selection accuracy. (https://docs.anthropic.com/en/docs/agents-and-tools/mcp-connector)

Option B makes the functional distinction explicit: Grep locates textual import statements, whereas analyze_dependencies constructs a semantic graph containing direct and transitive dependencies, cycles, and potentially unresolved references. Option A is a brittle global override. Option C removes a generally useful tool. Option D increases the number of tools and selection ambiguity, contrary to Anthropic's recommendation to consolidate related operations where practical.

Official references/topics: MCP Tool Discovery; Tool Descriptions; Tool Selection Accuracy; Tool-Surface Design.


Contribute your Thoughts:

0/2000 characters

Currently there are no comments in this discussion, be the first to comment!


Save Cancel