CCAR-F Tool Design and MCP Integration Practice Question
An architect is building an MCP server that exposes a tool for querying a customer relationship management (CRM) system. The tool accepts a free-form text parameter called 'query' and returns matching customer records. During testing, the model frequently sends malformed queries that cause the CRM API to return errors, and the model then hallucinates customer data. Which change to the MCP tool definition is the most effective way to constrain the model's input and reduce these errors?
⚠ Common exam trap
The trap here is assuming that prompt engineering or temperature adjustments can reliably constrain tool inputs, when only schema-level validation enforces the contract.
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 JSON Schema with an enum that lists the exact CRM API query operators the tool supports, and require the model to select from that list.
The core issue is that the tool accepts unconstrained free-form text, allowing malformed queries that the CRM API rejects. Adding a JSON Schema with an enum for the query operator enforces valid input at the protocol level, preventing errors before they reach the API. This is the most direct and reliable fix for the described failure mode.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Remove the 'query' parameter and replace it with a single numeric 'customer_id' parameter, forcing the model to always look up a specific record.
Why it's wrong here
While narrowing the input to a numeric ID would reduce malformed queries, it drastically limits the tool's usefulness for search-based CRM lookups. The scenario requires querying matching customer records, not just fetching one by ID. This change would eliminate the intended functionality rather than fix the input validation problem.
- ✗
Add a system prompt instructing the model to only send well-formed queries and to apologize if the CRM API returns an error.
Why it's wrong here
Prompt instructions are not enforced at the tool boundary. The model can still emit malformed queries, and an apology does not prevent hallucination. Without schema-level validation, the MCP server cannot guarantee valid input, so API errors and hallucinations would persist despite the added instruction.
- ✓
Add a JSON Schema with an enum that lists the exact CRM API query operators the tool supports, and require the model to select from that list.
Why this is correct
Providing a JSON Schema enum for the query parameter restricts the model's output to known, valid operators. This prevents malformed free-form input, reduces API errors, and eliminates the model's need to invent fallback data when the API rejects the request. It directly addresses the root cause: unconstrained input.
- ✗
Increase the model's temperature to encourage more creative query formulation so it can recover from API errors.
Why it's wrong here
Raising temperature increases randomness, which would make malformed queries more likely, not less. It does nothing to constrain the input space or prevent the CRM API from rejecting requests. The model would still hallucinate after errors, and the tool would remain unreliable in production.
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 →
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.