Courseiva

CCAR-F Tool Design and MCP Integration Practice Question

How should an MCP server communicate a non-recoverable error to the client?

⚠ Common exam trap

Candidates return standard raw text messages or stack traces instead of structured payloads, breaking client-side error handling logic.

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

✓

Send a JSON error object that adheres to the MCP Error specification.

MCP requires structured error communication so that the client can handle failures gracefully. Returning a standard error structure with an informative message and code allows the client to provide meaningful feedback to the user and trigger appropriate retry or fallback logic. This standardized error handling is essential for building robust integrations that don't just crash when a backend process fails, but instead remain responsive and transparent to the user.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Return a 500 Internal Server Error status code via the transport layer.

    Why it's wrong here

    While transport-level errors are standard, they often lack the granularity needed for MCP-specific failures. The MCP protocol provides its own error reporting mechanisms that should be used for tool-specific issues. Relying solely on raw HTTP errors makes it harder for the client to distinguish between transport and logic failures.

  • ✓

    Send a JSON error object that adheres to the MCP Error specification.

    Why this is correct

    The MCP protocol defines specific error objects for reporting issues during tool execution. Using this structure ensures that the client interprets the error correctly, allowing for programmatic handling of the failure. This is the correct, standard way to communicate issues while maintaining protocol compliance and system-wide interoperability.

  • ✗

    Return a string message indicating the failure as the result.

    Why it's wrong here

    Returning error messages as a string in the result field is poor practice, as it conflates successful tool outputs with failure states. The client will be unable to distinguish the two programmatically, leading to fragile integration logic. Error states should always be explicitly marked as such using the protocol's error objects.

  • ✗

    Close the connection abruptly to signal a critical failure.

    Why it's wrong here

    Abruptly closing the connection provides no context to the client and makes debugging significantly harder. It forces the client to assume a network-level failure when a logical error might be the cause. Graceful error reporting is required for professional applications that need to maintain uptime and observability.

About these practice questions

One of 271 original CCAR-F practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.