Courseiva

CCAR-F Tool Design and MCP Integration Practice Question

An architect is building an MCP server that exposes a tool named `fetch_weather`. The tool's input schema currently defines `location` as a string with no description. During testing, the model frequently sends postal codes for cities outside the supported region, causing upstream API errors. Which change to the tool definition most directly improves the model's ability to supply valid inputs?

⚠ Common exam trap

The trap here is assuming the model will infer regional constraints from the server's error responses instead of seeing them declared in the tool schema.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Add a `description` to the `location` property that states the accepted formats and supported regions.

Tool schemas are the model's contract for argument generation. When the model supplies out-of-region values, the fix is to encode the accepted formats and supported regions in the property description so the constraint is visible during inference. Adding validation tools, raising token limits, or changing the type do not communicate the regional restriction and therefore do not prevent the invalid input.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Register a second tool called `validate_location` and rely on the model to call it before `fetch_weather`.

    Why it's wrong here

    Adding a validation tool shifts responsibility to the model to sequence calls correctly, which is unreliable and adds a round trip. The schema for `fetch_weather` remains vague, so the model still has no basis for choosing a supported location. This increases complexity without addressing the root cause of the malformed input.

  • ✗

    Increase the max_tokens setting on the Claude API request so the model has more room to reason about the location.

    Why it's wrong here

    Max tokens controls response length, not the quality of tool argument selection. The model already produces a location value; the problem is that it lacks guidance on which values are acceptable. Raising the token ceiling wastes budget and latency while leaving the ambiguous schema unchanged, so invalid postal codes would continue to appear.

  • ✓

    Add a `description` to the `location` property that states the accepted formats and supported regions.

    Why this is correct

    The model selects and shapes tool arguments primarily from the schema's descriptive metadata. A property description that enumerates accepted formats and supported regions gives the model the constraints it needs at inference time, reducing invalid postal codes without requiring server-side rejection logic. This is the lowest-cost, most direct fix for the observed failure.

  • ✗

    Change the `location` type from string to number so the model is forced to send a numeric postal code.

    Why it's wrong here

    Numeric typing does not convey which regions are supported, and postal codes are not universally numeric. This change would break legitimate string-based locations such as city names and still permit out-of-region numeric codes. It narrows expressiveness while leaving the model uninformed about the actual constraint.

About these practice questions

This CCAR-F question is part of Courseiva's 271-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Anthropic exam blueprint

This CCAR-F practice question is part of Courseiva's free Anthropic certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CCAR-F exam.