Courseiva

CCNA Tool Design and MCP Integration Questions

54 questions · Tool Design and MCP Integration · All types, answers revealed

1
MCQmedium

An architect is designing an MCP server that exposes a tool to query a customer relationship management (CRM) system. The CRM API enforces per-tenant rate limits and returns HTTP 429 with a Retry-After header when exceeded. The architect wants the tool to behave predictably under load without the model having to reason about throttling. Which approach should the architect implement?

A.Cache every CRM response indefinitely and serve cached data whenever the API returns 429.
B.Return the raw HTTP 429 response body to the model and instruct it in the tool description to retry after a delay.
C.Implement server-side retry with exponential backoff and jitter that honors the Retry-After header, and surface a structured success or failure result to the model.
D.Configure the MCP client to automatically retry the tool call a fixed number of times without any server-side logic.
AnswerC

Handling retries inside the MCP server keeps throttling invisible to the model, honors the server-advertised Retry-After value, and uses jitter to avoid synchronized retry storms across tenants. The model receives a clean result envelope and can focus on the user's task. This is the standard pattern for integrating rate-limited upstream APIs behind a tool.

Why this answer

Rate-limit handling is an integration concern that should be encapsulated in the MCP server so the model never has to reason about HTTP 429 responses or timing. Honoring Retry-After with exponential backoff and jitter prevents synchronized retries and respects the upstream contract. The model then receives a normalized result it can act on, keeping tool behavior predictable under load.

Exam trap

The trap here is assuming the model should interpret transport errors and decide when to retry, when retry policy belongs inside the MCP server.

2
MCQmedium

When implementing an MCP resource that provides large datasets, what is the best practice for managing data transmission to avoid hitting context window limits?

A.Serialize the entire dataset into a single JSON object and return it.
B.Implement a paginated or filterable resource endpoint.
C.Compress the data using GZIP before sending it to the model.
D.Store the data in an external database and provide the connection string.
AnswerB

Pagination and filtering allow for the controlled retrieval of data, ensuring the model only receives the specific information it currently requires. This architectural pattern optimizes token usage, improves response times, and keeps the overall model performance stable even when working with extremely large underlying data sources.

Why this answer

MCP resources should implement pagination or selective filtering to return only necessary data. By breaking down massive datasets into granular chunks, the architect prevents the model from consuming excessive tokens with irrelevant information. This pattern ensures the model remains focused on the relevant data subset, preserving context window capacity for actual reasoning and reducing latency during the tool-use lifecycle.

Exam trap

Test-takers frequently assume that passing an entire raw dataset to the model is safe, forgetting the hard limitations of context window sizes.

3
Multi-Selectmedium

When designing an MCP server, which TWO of these factors primarily influence the model's performance in selecting the right tool?

Select 2 answers
A.The total amount of system memory allocated to the MCP server.
B.The semantic quality and uniqueness of the 'name' field.
C.The clarity and verbosity of the 'description' field.
D.The character count of the internal code implementation.
E.The version number of the MCP server protocol.
AnswersB, C

The 'name' field is the primary identifier the model uses to categorize and evaluate the tool's utility. Unique, semantically meaningful names allow the model to distinguish between similar operations, significantly improving the precision of the selection process. This is a critical design element for maintaining high tool-use accuracy.

Why this answer

Performance in tool selection depends on the clarity of the interface presented to the model. The tool name and its description are the first indicators the model evaluates to determine relevance. Architects must ensure these are highly descriptive, specific, and concise.

Proper naming and documentation reduce ambiguity, ensuring the model reliably maps user requests to the correct tools, which is essential for consistent automation in complex, multi-tool environments.

Exam trap

Candidates focus overly on the underlying code performance or execution speed of the tool rather than the semantic interface exposed to the LLM.

4
MCQmedium

When designing tools that perform destructive actions, such as deleting a cloud resource or sending a high-priority email, which architectural pattern is most recommended by Anthropic?

A.Implement a 'dry_run' parameter that the model must set to 'true' before it is allowed to set it to 'false'.
B.Require a Human-in-the-Loop (HITL) step where a human must review and approve the tool call before execution.
C.Use a specialized model with lower temperature settings to ensure the tool calls are always predictable and safe.
D.Encrypt the tool's API key and store it in a secure environment that only the model can access during runtime.
AnswerB

The Human-in-the-Loop pattern ensures that a person validates the model's intent and the specific parameters of a destructive action before it is finalized. This is the gold standard for safety in tool design, as it provides a critical manual check against model hallucinations or logic errors.

Why this answer

Safety and control are paramount when granting LLMs the ability to change the state of external systems. Implementing a Human-in-the-Loop (HITL) pattern for sensitive operations prevents autonomous errors that could have significant financial or operational consequences. This design choice balances the efficiency of AI with the necessary oversight for high-stakes tasks.

Exam trap

Candidates often suggest adding 'warning' prompts or 'confirmation' steps within the model's output, which can be ignored by the LLM, rather than implementing a mandatory, external Human-in-the-Loop architectural gate.

5
MCQmedium

An architect is implementing an MCP server that exposes a tool to create a new project in a project management system. The tool requires a project name, a list of team member emails, and a due date. The architect wants to minimize the chance that the model provides invalid or missing arguments. Which design choice best achieves this?

A.Implement server-side validation that rejects invalid requests and returns an error message to the model.
B.Allow any string for each parameter and let the model infer the correct format from examples in the prompt.
C.Provide a detailed natural language description in the tool's description field explaining each parameter.
D.Define the input schema with JSON Schema, marking all properties as required and specifying formats for email and date.
AnswerD

Using JSON Schema with required properties and format constraints (such as email and date) gives the model explicit rules to follow. The MCP client can validate inputs before sending, reducing invalid calls. It also documents the expected types clearly, which helps the model generate correct arguments. This is the most direct way to minimize missing or malformed parameters.

Why this answer

Defining a JSON Schema with required properties and format constraints (e.g., email, date) gives the model a clear contract. The MCP client can validate against this schema before invoking the tool, catching missing or malformed arguments early. This proactive constraint is more effective at minimizing invalid inputs than relying on descriptions or server-side rejection alone.

Exam trap

The trap here is thinking that a detailed description or server-side validation is enough, when a strict input schema is the most effective way to guide the model to produce valid arguments in the first place.

6
MCQmedium

When designing an MCP server, what is the best practice for handling dependencies between multiple tools?

A.Chain tool calls by storing state in a global variable within the MCP server process.
B.Combine dependent tools into a single, monolithic tool to guarantee the order of execution.
C.Design each tool to be atomic and rely on the model to orchestrate the sequential execution.
D.Force the model to provide a 'chain_id' parameter to track the context across multiple tool calls.
AnswerC

Atomic tools allow the model to manage the flow based on the results of each step. This approach is more resilient because the model can handle errors, branch logic, or request clarification between steps, providing a more robust and flexible integration than hard-coded, server-side chaining.

Why this answer

The best practice is to design tools to be stateless and independent, requiring the orchestration logic to reside within the LLM agent or client. By ensuring that each tool performs a single, atomic action, you minimize coupling. This approach makes the tools easier to test, reuse, and maintain, and prevents complex state-dependency issues that can occur when one tool relies on the side effects of another in the same session.

Exam trap

Candidates often try to chain tools together inside the server code, creating tightly coupled, stateful dependencies that are difficult to debug, rather than letting the LLM orchestrate them as atomic, independent steps.

7
MCQmedium

An architect is designing an MCP server that retrieves real-time financial data. To ensure the model does not hallucinate during tool execution, which design pattern is most effective for tool definition?

A.Using a generic string field for all parameters to allow for flexibility.
B.Embedding the tool logic directly into the system prompt instead of using MCP tools.
C.Defining explicit JSON Schema objects for every argument with strict validation.
D.Allowing the model to infer tool parameters based on conversational history.
AnswerC

Defining explicit JSON Schema objects provides the model with clear structural requirements and constraints for every argument. This formal approach enables the model to validate parameters before invocation, significantly reducing hallucination risks and ensuring that the tool receives inputs that strictly conform to the expected format and constraints.

Why this answer

Providing specific, constrained schema definitions within the MCP tool declaration ensures the Claude model understands the exact parameters required. This minimizes ambiguity and prevents the model from attempting to pass invalid data types. By explicitly defining the input schema using JSON Schema, the architect enforces strict structural integrity, which is critical for tool reliability and successful integration with Anthropic's platform capabilities during runtime execution.

Exam trap

Exam takers often rely solely on natural language descriptions within tool definitions, underestimating the strict structural requirement of JSON Schema validation.

8
Multi-Selectmedium

Which THREE of the following are benefits of using JSON Schema for MCP tool input definitions?

Select 3 answers
A.It enforces strict type-checking on the input arguments before the tool logic is invoked.
B.It automatically generates a graphical user interface for the end-user to trigger tools manually.
C.It provides clear constraints that guide the model to select the correct parameters.
D.It enables consistent error messaging when the model provides arguments that do not match the expected format.
E.It allows the server to change the tool's input structure dynamically based on the current time.
AnswersA, C, D

Type enforcement at the protocol boundary prevents malformed data from reaching the internal logic. This ensures that the code inside the tool doesn't need to manually check every input, resulting in cleaner, safer, and more maintainable code that adheres to standard expectations for data processing.

Why this answer

JSON Schema provides a formal contract that facilitates three key areas: automated validation, clear documentation for the model, and consistent error handling. By defining the structure, types, and constraints of inputs, you ensure that the server rejects invalid requests before they reach sensitive business logic. This proactive approach significantly reduces runtime errors and provides the model with the necessary constraints to generate accurate tool calls, leading to a more reliable agent.

Exam trap

Candidates often believe JSON Schema is exclusively used for documentation purposes, overlooking its critical role in runtime validation and security.

9
MCQeasy

When designing an MCP tool that interacts with a high-latency external API, which strategy should be implemented to ensure a smooth interaction for the end-user?

A.Increase the timeout values on the client side to wait indefinitely for the tool response.
B.Utilize MCP progress notifications to inform the client about the long-running operation's status.
C.Cache all API responses locally on the server to avoid calling the API during tool execution.
D.Split the request into multiple smaller tools to reduce the overall latency of the single API call.
AnswerB

MCP progress notifications allow the server to send updates to the client during a tool execution. This provides real-time feedback to the user, managing expectations during high-latency operations and preventing the perception of a frozen or broken integration while waiting for the final response from the external API.

Why this answer

Implementing asynchronous status updates or progress reporting is critical for long-running tool operations in MCP. Since the protocol supports tool-initiated notifications, the server can inform the client about the status of a request before final completion. This prevents timeouts and provides transparency, ensuring the user experience remains responsive even when the underlying tool depends on slow, external network-bound API calls.

Exam trap

Candidates mistakenly suggest standard synchronous waiting or polling mechanisms implemented on the client side, rather than leveraging protocol-native progress notifications.

10
MCQmedium

An architect is building an MCP server that exposes a `read_file` tool. The tool's input schema currently defines `path` as a plain string. Security review requires that the tool never read outside a configured workspace root, and that the model receive a clear, machine-readable error when it attempts to do so. Which change to the tool design best satisfies this requirement?

A.Have the server resolve the requested path against the workspace root, reject traversal outside it, and return a structured error object.
B.Add a `root` parameter to the schema so the model can specify the allowed workspace root on each call.
C.Keep `path` as a string but document in the tool description that paths must stay inside the workspace root.
D.Constrain `path` in the JSON Schema with an `enum` of known filenames and reject any other value.
AnswerA

Canonicalizing the requested path against the configured workspace root and rejecting anything that escapes it enforces the boundary regardless of what the model sends. Returning a structured error object (for example, a code and message) lets the model understand the failure and adjust rather than hallucinate success. This is the only option that both enforces and communicates the constraint.

Why this answer

The secure pattern is server-side enforcement plus a structured error. The MCP server should resolve the incoming path, confirm it stays within the workspace root, and return a typed error payload when it does not. That keeps the security boundary out of the model's control while still giving the model enough information to recover gracefully on the next turn.

Exam trap

The trap here is assuming that a well-written tool description or an enum of filenames is equivalent to server-side path validation.

11
MCQhard

An architect needs to implement a tool that allows the LLM to search a file system. What is the most secure way to present this capability?

A.Allow the model to provide any absolute path as an argument.
B.Implement a 'root_directory' parameter that the model can change dynamically.
C.Design the tool to accept relative paths within a predefined server-side root.
D.Provide a tool that lets the model browse all directories starting from '/'
AnswerC

This approach uses a server-side enforced root, which prevents the LLM from accessing files outside the designated workspace. By resolving paths against a fixed base, you eliminate directory traversal risks. This design pattern ensures the tool is useful while maintaining a strict, secure boundary against unauthorized file system access.

Why this answer

Providing a file system tool requires strict path sandboxing to prevent directory traversal and unauthorized access. By defining a single, restricted 'base_path' and ensuring the server programmatically validates that requested paths reside within this directory, the architect creates a secure boundary. This design prevents the LLM from accessing sensitive system files or configuration data, fulfilling the security requirements necessary for professional-grade MCP tool implementation.

Exam trap

Candidates allow the LLM to pass absolute file paths freely, exposing the system to severe directory traversal and unauthorized file access vulnerabilities.

12
MCQeasy

A team is exposing an internal inventory database to Claude through an MCP server. They want the model to retrieve a specific item by its SKU, and they want the tool contract to be unambiguous so the model rarely mis-calls it. Which tool definition best matches this goal?

A.A `query_inventory` tool that takes no parameters and returns the full inventory table.
B.A `query_inventory` tool with optional `sku`, `name`, `category`, and `warehouse` fields, none required.
C.A `query_inventory` tool that accepts a free-form SQL `where` clause string.
D.A `query_inventory` tool whose input schema has a single required string field named `sku`.
AnswerD

A single required string field named `sku` gives the model one obvious thing to supply and nothing to guess about. The narrow contract reduces ambiguity, so the model is unlikely to invent extra parameters or omit the required one. This directly serves the goal of a low-mis-call tool for SKU lookup.

Why this answer

The strongest tool contract for a keyed lookup is the one with the fewest, most specific required inputs. A single required `sku` string tells the model exactly what to provide and nothing more, which minimizes ambiguity and downstream errors. Broader or freer schemas trade precision for flexibility that this scenario does not need.

Exam trap

The trap here is equating flexibility in the input schema with better tool design, when narrow, explicit contracts reduce mis-calls.

13
MCQhard

An architect is designing an MCP server that exposes a tool to retrieve employee records from an internal HR system. The tool accepts a 'department' parameter. To prevent the model from retrieving records outside the user's authorized departments, the architect wants to enforce access control at the MCP layer. Which approach best ensures that the model cannot bypass authorization?

A.Include a detailed description in the tool's JSON Schema stating that the model must only request departments the user is allowed to see.
B.Validate the requested department against the authenticated user's permissions on the MCP server before executing the HR system query, and return an authorization error if not permitted.
C.Configure the MCP server to run with the same permissions as the HR system's service account, which has access to all departments, and rely on the model to request only allowed departments.
D.Add a post-processing step that filters the HR system's response to remove any records from departments the model was not supposed to request.
AnswerB

Enforcing authorization server-side, using the authenticated user's identity, ensures that even if the model requests an unauthorized department, the request is rejected. This creates a hard security boundary independent of model behavior. The model cannot bypass it because the check occurs before any data is accessed.

Why this answer

Authorization must be enforced at the MCP server using the authenticated user's identity, not delegated to the model or applied after data retrieval. By validating the requested department against the user's permissions before querying the HR system, the server creates a hard boundary that the model cannot circumvent. This aligns with least privilege and zero-trust principles.

Exam trap

The trap here is treating schema descriptions or post-hoc filtering as security controls, when only pre-execution server-side authorization checks can reliably prevent unauthorized access.

14
Multi-Selecthard

An architect is designing an MCP server that exposes tools for a customer relationship management (CRM) system. The tools include 'get_customer', 'update_customer', and 'delete_customer'. The architect wants to ensure that tool invocations are properly authorized and audited. Which two design elements should be included in the MCP server implementation? (Choose two.)

Select 2 answers
A.Rely on the model's system prompt to instruct it to only call tools when the user is authorized.
B.Validate the caller's OAuth 2.0 access token on every tool invocation before executing the operation.
C.Embed the caller's identity and permissions in the tool input schema as required parameters.
D.Store a static API key in the MCP server configuration and use it for all tool calls regardless of caller.
E.Log the full tool input and output along with the authenticated user ID and timestamp for each invocation.
AnswersB, E

Validating the OAuth 2.0 access token on each invocation ensures that only authenticated and authorized callers can execute tools. It ties tool execution to a verifiable identity and scope, preventing unauthorized access even if the model is manipulated. This is a standard security practice for MCP servers that expose sensitive operations and should be enforced server-side, independent of model behavior.

Why this answer

The two correct elements are validating the caller's OAuth 2.0 access token on every invocation and logging full tool inputs/outputs with authenticated user ID and timestamp. Together they enforce authorization at the server and provide an audit trail. Token validation ensures only authorized callers can execute tools, while logging enables traceability and detection of misuse.

Exam trap

The trap here is thinking that embedding identity in the tool schema or relying on system prompts provides security, when real protection requires server-side token validation and independent audit logging.

15
MCQmedium

An architect is concerned about prompt injection attacks targeting an MCP tool. Which strategy provides the strongest defense?

A.Implement a natural language filter to detect malicious intent before tool invocation.
B.Use strict JSON Schema validation and server-side parameter sanitization.
C.Ask the model to verify if the user's prompt is malicious before executing.
D.Disable all tool execution if the prompt contains special characters.
AnswerB

Strict schema validation acts as a structural firewall, while parameter sanitization ensures that any dynamic data is safely handled. This combined approach is the industry-standard defense against injection. It prevents the model from injecting unintended characters or commands into the tool's backend execution logic, maintaining overall system integrity.

Why this answer

Defending against prompt injection in MCP requires treating all LLM inputs as untrusted. By using strict schema validation, type enforcement, and server-side input sanitization, you limit the attacker's ability to manipulate backend logic. This multi-layered approach ensures that even if the model is compromised by a malicious user prompt, the tool server remains resilient against unauthorized command execution or data exposure.

Exam trap

Candidates rely solely on system prompt warnings to deter malicious injection attempts, neglecting the necessity of cryptographic or schema-level input controls.

16
Multi-Selectmedium

An architect is reviewing an MCP server's tool catalog before release. The team wants to reduce the chance that Claude selects the wrong tool when several tools have overlapping purposes, and to make failures easier to diagnose. Which two changes best support those goals? (Choose two.)

Select 2 answers
A.Merge all overlapping tools into one function with a `mode` parameter that selects behavior internally.
B.Return errors from tools as structured objects with a stable code and a human-readable message.
C.Rely on the model's general reasoning to disambiguate similar tools without changing names or descriptions.
D.Increase the number of tools in the catalog so the model has a fallback for every conceivable case.
E.Give each tool a distinct, action-oriented name and a description that states when to use it and when not to.
AnswersB, E

Structured errors let the model react consistently and let operators filter logs by code. A stable code separates validation failures from upstream outages, which shortens diagnosis. Free-text-only errors force both the model and the on-call engineer to parse prose, which is slower and less reliable.

Why this answer

Tool selection quality comes from clear, distinct names and descriptions, while diagnosis quality comes from structured, coded errors. Together they reduce wrong-tool calls and make remaining failures easy to trace. Merging tools, expanding the catalog, or relying on implicit reasoning all move in the wrong direction for these two goals.

Exam trap

The trap here is assuming that consolidating similar tools or enlarging the catalog improves selection, when distinct naming and structured errors are what actually help.

17
MCQeasy

In the context of the Model Context Protocol (MCP), what is the primary role of an 'MCP Host' application?

A.It serves as the centralized repository for all public MCP tool definitions and schemas.
B.It provides the raw data and computational logic for specific tools like database access or file manipulation.
C.It initiates connections to MCP servers and manages the model's access to tools and resources.
D.It acts as a sandbox environment that executes untrusted code generated by the AI model.
AnswerC

The MCP host, such as Claude Desktop or a custom IDE, is responsible for establishing connections to various servers. It facilitates the flow of information by passing tool definitions to the model and routing the model's execution requests back to the appropriate server for processing.

Why this answer

Understanding the MCP architecture is vital for architects building extensible AI applications. The host acts as the primary interface between the user, the AI model, and the various MCP servers. It manages the lifecycle of connections and coordinates how the model interacts with the tools and resources exposed by the connected servers.

Exam trap

Candidates often confuse the MCP Host with the MCP server, mixing up the application that manages connections versus the provider of tools.

18
MCQhard

An architect is exposing an MCP server whose 'get_account_balance' tool must never be invoked until the client has completed an OAuth token exchange, and the server must also advertise that this tool is unavailable to anonymous sessions. Which MCP capability should the architect implement to satisfy both requirements?

A.Expose 'get_account_balance' through a resources primitive instead of a tool, since resources are read-only and therefore inherently restricted to authenticated clients.
B.Declare the tool with an inputSchema that marks a required 'access_token' string property, and reject calls whose token fails validation inside the tool handler.
C.Return an isError result from the tool handler whenever the session lacks a valid token, instructing the model in the error text to retry after authentication.
D.Serve the tool list dynamically so that 'get_account_balance' is only returned to clients that present a valid bearer token, and omit it from tools/list responses for unauthenticated sessions.
AnswerD

MCP servers may compute tools/list results per session, so an authenticated session receives the balance tool while anonymous sessions never see it. This satisfies both requirements at once: the capability is not discoverable before the OAuth exchange completes, and the server itself advertises that the tool is unavailable to anonymous clients rather than relying on a post-hoc argument check.

Why this answer

Because MCP servers can vary the tools they advertise per session, gating the tools/list response on a validated bearer token hides the balance operation entirely from anonymous clients while presenting it normally after OAuth completes. This enforces the precondition at the discovery layer, where the client's authentication state is actually known, instead of relying on argument schemas or error handling after the model has already attempted the call.

Exam trap

The trap here is assuming that a required credential field in the tool's inputSchema enforces authentication, when schemas only validate argument shape and never gate discovery or callability.

19
Multi-Selectmedium

The Model Context Protocol (MCP) defines three primary primitives that servers can expose to clients. Which THREE of the following are the core primitives of MCP?

Select 3 answers
A.Resources: Read-only data sources such as files, database tables, or API responses.
B.Tools: Executable functions that allow the model to perform actions and interact with external systems.
C.Prompts: Pre-defined templates that guide the model's behavior or provide reusable conversation starters.
D.Workflows: Sequential chains of tool calls managed automatically by the MCP server without host intervention.
E.Models: The specific LLM versions that are hosted directly within the MCP server for local processing.
AnswersA, B, C

Resources in MCP are designed to provide the model with background context or data that it can read. They represent the 'knowledge' side of the protocol, allowing the host to pull in relevant information from various external sources to ground the model's responses in factual data.

Why this answer

MCP is built on a small set of powerful primitives that allow for standardized data and capability exchange. Understanding these three components—Resources, Tools, and Prompts—is essential for any architect designing MCP-compliant systems. Each primitive serves a distinct purpose in providing context, capabilities, and reusable interaction patterns to the model.

Exam trap

Candidates frequently confuse MCP primitives with general LLM concepts like 'History' or 'Memory', missing the specific technical definitions of Resources, Tools, and Prompts defined by the protocol.

20
MCQhard

An architect is building an MCP server whose tool returns large tabular results, sometimes several megabytes. Early testing shows the model truncates or ignores the data and occasionally exceeds context limits. The architect wants the model to reason over the full dataset without losing fidelity. Which design should the architect choose?

A.Compress the dataset with gzip and return the base64-encoded payload so the model can decompress it during reasoning.
B.Return the entire dataset as a single JSON string in the tool result and rely on the model's long context window to handle it.
C.Expose the dataset as an MCP resource with pagination and provide a separate query tool that filters, aggregates, or samples rows before returning compact results.
D.Split the dataset into many small tool results and instruct the model to call the tool repeatedly until it has seen every row.
AnswerC

Separating bulk data access (a paginated resource) from reasoning-oriented access (a query tool) lets the model pull only the rows it needs. The resource supports direct inspection when required, while the tool returns small, structured results that fit comfortably in context. This is the recommended pattern for large datasets in MCP servers.

Why this answer

Large datasets should be exposed through a paginated MCP resource for direct access and a query tool that performs filtering, aggregation, or sampling server-side. This keeps tool results compact and relevant, avoids context exhaustion, and lets the model reason over exactly the data it needs. Treating context size as the solution to big data is an anti-pattern that degrades accuracy and increases cost.

Exam trap

The trap here is equating a large context window with the ability to reason over arbitrarily large tool outputs, when retrieval design is what actually preserves fidelity.

21
MCQeasy

When designing an MCP tool, why is it important to define a clear 'description' for every property in the 'inputSchema'?

A.To allow the server to automatically validate the input against the description.
B.To help the model understand the purpose and expected format of each parameter.
C.To optimize the JSON payload size by shortening variable names.
D.To ensure the MCP client displays the property in the user interface.
AnswerB

Descriptions provide the necessary context for the model to generate high-quality arguments. When parameters have clear, descriptive text explaining their purpose, unit requirements, or expected range, the model makes fewer mistakes, leading to more reliable tool execution and fewer failed requests from the agent.

Why this answer

Detailed property descriptions significantly improve the model's ability to provide accurate values. Without them, the model must guess the required format, units, or context of each parameter. Providing explicit descriptions acts as a form of in-context documentation, which is crucial for reducing errors and ensuring that the model understands the semantic meaning behind each field in the tool's input.

Exam trap

Test-takers frequently assume parameter names alone are self-explanatory, neglecting descriptions in the inputSchema and leading to malformed model outputs.

22
MCQmedium

What is the recommended method for handling large tool outputs in MCP?

A.Base64 encode the large output and embed it directly in the tool result.
B.Truncate the output arbitrarily to fit the available context window.
C.Return a summary and a link/ID to fetch the full data via a resource endpoint.
D.Split the response into multiple sequential tool calls.
AnswerC

This approach keeps the initial response lightweight while providing a clear path to access detailed information if needed. It follows standard architectural patterns for handling big data in constrained protocols, ensuring that the system remains stable and performant while still supporting all necessary functionality for the end user.

Why this answer

MCP is not designed to pass massive amounts of data directly within the JSON response, as this can crash the connection or exceed token limits. The architect should return a reference or a summary, and provide a secondary resource-based retrieval mechanism if the full data is needed. This approach maintains the efficiency of the MCP protocol and ensures the system remains responsive, avoiding the performance bottlenecks associated with large data payloads.

Exam trap

Candidates often try to pass large data payloads directly through the JSON response, forgetting that the MCP protocol is not designed to handle massive strings and will likely cause connection timeouts or errors.

23
Multi-Selectmedium

An architect is reviewing an MCP server that exposes a tool to create support tickets. The tool currently returns a plain text confirmation. The architect wants to improve how the model and client application consume the result. Which two changes should the architect make? (Choose two.)

Select 2 answers
A.Return a structured JSON object containing the ticket ID, status, and canonical URL, and declare an output schema for the tool.
B.Include a human-readable summary field alongside machine-readable fields so the model can quote a concise confirmation to the user.
C.Return the result as a Markdown table embedded in a text block so it renders nicely in chat clients.
D.Add a boolean success field and omit all other data to keep the response as small as possible.
E.Return the full HTTP response from the ticketing backend, including headers and trace IDs, so the model has maximum information.
AnswersA, B

A structured result with an output schema lets the model reference exact fields, enables client-side rendering or linking, and makes downstream automation reliable. It also allows validation of the server's response. Plain text forces the model to parse free-form prose, which is brittle and wastes tokens.

Why this answer

Tool results should be structured so the model can reference precise fields and the client can act on them, and an output schema makes that contract explicit. Pairing machine-readable fields with a concise summary field gives the model a safe phrase to relay to the user. Together these changes improve reliability, reduce token waste, and support downstream automation.

Exam trap

The trap here is treating a tool result as a message for humans only, when it is also a data contract for the model and client application.

24
MCQhard

An architect is designing an MCP server that will be used by multiple Claude clients, each with different tool requirements. The server currently exposes all tools to every client. The architect wants to reduce the risk of a client accidentally invoking a tool it should not use, while keeping the server maintainable. Which approach best fits this goal?

A.Expose all tools but add a warning in each tool's description about which clients should use it.
B.Implement role-based access control (RBAC) at the MCP server, exposing only the tools permitted for the authenticated client's role.
C.Create a separate MCP server instance for each client, each with a hardcoded subset of tools.
D.Rely on each client's system prompt to instruct the model to only use certain tools.
AnswerB

RBAC at the server allows you to filter the list of tools based on the client's role, so each client only sees and can invoke authorized tools. This reduces accidental misuse and keeps a single server codebase. It centralizes policy enforcement and is maintainable as roles evolve. It also aligns with least privilege, ensuring clients cannot call tools outside their scope.

Why this answer

Implementing RBAC at the MCP server lets you filter the tool list per authenticated client based on role. Clients only see and can invoke permitted tools, reducing accidental misuse. This centralizes policy, avoids duplicating servers, and is maintainable.

It enforces least privilege without relying on prompts or documentation.

Exam trap

The trap here is assuming that separate servers or prompt instructions provide security, when centralized server-side RBAC is the maintainable and enforceable way to restrict tool access per client.

25
MCQmedium

An architect is designing an MCP server that retrieves real-time inventory levels from a legacy SQL database. The model needs to perform a partial update on specific stock quantities. Which design approach ensures the highest reliability and adherence to the Model Context Protocol standards?

A.Allow the model to execute raw SQL queries passed as string parameters to a generic execute_query tool.
B.Implement the inventory update tool as a system prompt instruction rather than an explicit MCP tool definition.
C.Define a specific tool with a JSON Schema input object that mandates the stock_id and quantity fields.
D.Use the MCP resources feature instead of tools to push inventory updates to the database.
AnswerC

Defining a formal JSON Schema for tool inputs allows the client to validate arguments before tool execution. This ensures that the model adheres to the required data structure, reducing runtime errors and improving the robustness of the integration between the LLM and the backend legacy inventory database.

Why this answer

Using a dedicated tool with strict JSON Schema definition for inputs ensures the model provides well-structured arguments. By validating these arguments against the schema before execution, the server prevents malformed queries from reaching the legacy database. This architectural pattern separates tool logic from communication protocols, maintaining clean boundaries between Anthropic models and internal data sources while ensuring robust error handling for unexpected input types.

Exam trap

Candidates often suggest complex multi-step workflows or custom logic to handle updates, missing that the simplest, most reliable approach is enforcing input validity directly at the tool's JSON Schema definition layer.

26
MCQmedium

When designing a multi-step tool process, which architecture most effectively prevents the model from getting stuck in an infinite loop?

A.Enable auto-retry logic on every tool call.
B.Use a state machine to track progress and enforce a maximum step count.
C.Rely on the model's internal reasoning capability to detect and break loops.
D.Require human intervention for every tool call in the sequence.
AnswerB

A state machine provides a formal way to manage the sequence of operations, and a maximum step count acts as a fail-safe. This ensures the process is always moving toward completion or hitting a defined exit condition, preventing infinite loops and providing clear debugging paths when a process fails.

Why this answer

Implementing a clear step-tracking mechanism or a 'max-iterations' limit in the orchestration logic prevents infinite loops. By forcing the model to complete a task within a predefined number of steps, the architect ensures that the process eventually terminates. This design pattern is critical for autonomous agents, ensuring that even if the model fails to reach a state transition, the overall system remains responsive and under control.

Exam trap

Candidates often rely solely on the model's internal reasoning to stop multi-step processes, forgetting to implement hard architectural limits like iteration counters.

27
MCQeasy

Which component is responsible for executing the logic associated with an MCP tool?

A.The Anthropic model itself.
B.The MCP Client application.
C.The MCP Server.
D.The JSON Schema definition.
AnswerC

The MCP server is specifically designed to host tools, manage their lifecycle, and execute the backend logic when invoked. This architectural separation ensures that tools remain modular, secure, and easily maintainable. By keeping execution on the server, you protect sensitive backend resources from direct access by the client.

Why this answer

The MCP server is the component responsible for defining and executing the tools. The client serves as the interface between the model and the server, but the server holds the actual business logic and implementation. This distinction is vital for architecting secure systems, as it allows the server to remain isolated, audit-logged, and independently scalable from the client-side model orchestration.

Exam trap

Candidates often confuse the client (the orchestrator) with the server (the executor). This leads to incorrect architectural designs where the model-facing client is incorrectly burdened with backend business logic.

28
MCQmedium

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?

A.Remove the 'query' parameter and replace it with a single numeric 'customer_id' parameter, forcing the model to always look up a specific record.
B.Add a system prompt instructing the model to only send well-formed queries and to apologize if the CRM API returns an error.
C.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.
D.Increase the model's temperature to encourage more creative query formulation so it can recover from API errors.
AnswerC

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.

Why this answer

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.

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.

29
MCQeasy

An architect is defining an MCP tool that returns weather data for a given city. The tool's output schema currently returns a free-text string. The architect wants to improve the model's ability to use the data in subsequent reasoning. What is the best change to the tool's output definition?

A.Return a structured JSON object with fields for temperature, humidity, and conditions.
B.Return a base64-encoded binary blob representing the weather data.
C.Return a list of key-value pairs as a single concatenated string.
D.Return a natural language sentence that includes all relevant weather details.
AnswerA

Structured JSON output gives the model explicit fields it can reference reliably in later steps. Free-text strings require the model to parse and may lead to misinterpretation. A schema with named properties reduces ambiguity and enables downstream tools or logic to consume the data programmatically. This improves consistency and reduces hallucination when the model reasons about the values.

Why this answer

Returning a structured JSON object with explicit fields like temperature, humidity, and conditions gives the model a clear, machine-readable format. This reduces ambiguity, supports reliable extraction of values, and integrates well with downstream reasoning or tool calls. Structured output is a best practice for MCP tools that provide data used in further steps.

Exam trap

The trap here is assuming that any textual representation is sufficient, when the model benefits significantly from structured, schema-defined output that it can parse deterministically.

30
MCQhard

An MCP server exposes an `execute_task` tool that can run arbitrary shell commands in a sandbox. During evaluation, the architect observes that the model sometimes calls the tool with a command that succeeds but produces no useful output, then calls it again with a nearly identical command, repeating several times. Which design change most directly addresses this loop behavior?

A.Add a required `command` parameter to the schema so the model must always supply a command string.
B.Return a structured result that distinguishes success with empty output from failure, and include guidance on the next valid action.
C.Split `execute_task` into separate tools for read-only and mutating commands to reduce accidental side effects.
D.Increase the tool's timeout so slow commands have more time to return useful output.
AnswerB

The model repeats because a successful-but-empty result looks the same as an uninformative one, so it has no signal that retrying is pointless. Returning a structured result that separates the empty-success case from genuine failure, plus a hint about valid next actions, gives the model the information it needs to change strategy instead of looping. This targets the actual cause.

Why this answer

Loops typically arise when the model cannot tell the difference between an uninformative success and a failure, so it retries in the hope of a better result. A structured result that flags empty output as a distinct outcome, together with guidance about acceptable next actions, breaks that cycle. Input schema changes and tool splitting do not supply the missing feedback.

Exam trap

The trap here is treating repeated tool calls as a timeout or parameter problem when the real issue is ambiguous result semantics.

31
MCQhard

An architect is designing an MCP server that will be used by multiple client applications, some of which support only a subset of MCP capabilities. The architect wants tools to remain usable across clients without requiring per-client server forks. Which design principle should guide the server implementation?

A.Advertise every capability the server implements and require clients to support all of them before connecting.
B.Declare server capabilities during initialization and implement graceful degradation so tools work with the features each client actually supports.
C.Detect the client's product name and branch behavior with client-specific code paths for each known application.
D.Expose only the lowest common denominator of features so every client behaves identically regardless of its capabilities.
AnswerB

MCP initialization negotiates capabilities, so declaring what the server supports lets clients adapt and lets the server avoid assuming features that may be absent. Tools should be designed so core behavior works without optional features, with enhancements layered on when supported. This keeps a single server usable across heterogeneous clients.

Why this answer

MCP is built around capability negotiation during initialization, so a server should declare what it supports and design tools to degrade gracefully when a client lacks optional features. This allows one server to serve heterogeneous clients without forks or identity-based branching. Lowest-common-denominator design and mandatory capability requirements both undermine that goal.

Exam trap

The trap here is assuming all MCP clients implement the same feature set, when capability negotiation exists precisely because they do not.

32
MCQmedium

An architect is designing a tool for Claude to interact with a corporate database. The tool needs to retrieve employee records by department. Which approach to naming and describing the tool and its parameters will most likely result in the highest model accuracy and reliability?

A.Use generic names like 'get_data' and 'param1' to keep the schema concise and reduce token usage in the system prompt.
B.Use specific names like 'get_employee_by_department' and include a detailed description of the 'department' parameter values.
C.Omit the parameter descriptions entirely to allow Claude's internal reasoning to determine the appropriate values based on the conversation history.
D.Combine multiple unrelated functions into a single 'universal_tool' to simplify the JSON schema and consolidate the logic.
AnswerB

Specific, semantically meaningful names and detailed parameter descriptions provide Claude with the necessary context to determine the tool's relevance to a query. This clarity ensures that the model provides correctly formatted values that match the expected input types, significantly reducing the likelihood of tool execution errors.

Why this answer

Designing clear and descriptive tool schemas is fundamental for Claude to understand when and how to invoke external functions. This practice prevents hallucinations and ensures the model provides the correct arguments. Architects must prioritize semantic clarity in the name, description, and property fields to bridge the gap between the model's reasoning and the technical execution environment.

Exam trap

Candidates choose generic tool and parameter names like 'getData' with empty descriptions, expecting the model to guess expected values.

33
MCQmedium

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

A.Return a 500 Internal Server Error status code via the transport layer.
B.Send a JSON error object that adheres to the MCP Error specification.
C.Return a string message indicating the failure as the result.
D.Close the connection abruptly to signal a critical failure.
AnswerB

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.

Why this answer

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.

Exam trap

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

34
MCQmedium

What is the primary advantage of using a dedicated MCP server over embedding tool logic directly into the application code?

A.It eliminates the need for any tool documentation or description.
B.It enables independent scaling and easier maintenance of the tool logic.
C.It forces the model to use the tools more frequently.
D.It removes the need to validate inputs as the server is 'trusted'.
AnswerB

Decoupling tools from the core application into a dedicated server allows for independent deployment and scaling of resources. This modularity simplifies maintenance and security, as updates to tool logic don't require downtime for the main application, providing a more robust architecture for complex, multi-service agent systems.

Why this answer

Separating the MCP server allows for independent scaling, improved security through isolated execution environments, and modularity. By moving tools into their own processes, the architect can maintain, update, and secure these tools without redeploying the entire application. This separation of concerns is fundamental for building large-scale agentic systems where tool sets evolve at different speeds than the main application, ensuring stability and ease of integration.

Exam trap

Many candidates believe embedding tool logic directly into application code is safer or simpler, missing the architectural advantages of process isolation and independent scaling.

35
Multi-Selecthard

An architect is designing an MCP server that wraps a ticketing system. The design must let Claude call tools safely and must keep tool definitions maintainable as the API grows. Which two practices should the architect apply? (Choose two.)

Select 2 answers
A.Expose one generic `call_ticket_api` tool that accepts an arbitrary endpoint path and HTTP method as string arguments.
B.Return structured, machine-readable errors from tool handlers so the model can correct invalid arguments on retry.
C.Inline all tool descriptions as long prose in the system prompt instead of in the tool definitions themselves.
D.Define each tool's `inputSchema` with precise types, enums, and descriptions, and keep the schema in version control alongside the server code.
E.Grant the server's service account full administrative scope on the ticketing system so any tool call will succeed.
AnswersB, D

Structured errors name the offending field or condition, letting the model repair its call instead of repeating the same mistake. This raises the success rate of tool use without loosening the schema or granting broader access. It also produces consistent failure semantics that are easier to maintain across many tools as the ticketing API grows.

Why this answer

Safe, maintainable MCP tooling rests on precise, versioned schemas that tell the model exactly what each tool accepts, plus structured error results that let the model recover from invalid arguments. Together these raise call accuracy without widening privileges. Generic passthrough tools, over-broad service accounts, and prompt-embedded descriptions each undermine either safety or maintainability, and none of them scale cleanly as the ticketing API grows.

Exam trap

The trap here is favoring a single flexible passthrough tool or maximal permissions for convenience, when precise schemas and least privilege are what make tool use both safe and maintainable.

36
Multi-Selecthard

Which TWO of the following are primary benefits of using the Model Context Protocol (MCP) over a proprietary REST-based tool integration?

Select 2 answers
A.It forces all communication to use binary protocols for maximum performance.
B.Standardization allows for easier reuse of tools across different MCP-compliant clients.
C.It enables a unified way for models to discover and interact with diverse data sources.
D.It eliminates the need for any authentication or security headers in tool calls.
E.It automatically converts all SQL databases into text files for the model.
AnswersB, C

Standardization ensures that any MCP-compliant tool can be plugged into any MCP-compliant host. This creates a reusable ecosystem where developers write a tool once and can immediately deploy it across various IDEs, AI assistants, and platforms without modification, significantly reducing development time and maintenance overhead.

Why this answer

MCP provides a standardized communication layer that decouples data sources from the model, enabling interoperability across different client applications. By leveraging a common protocol, developers avoid building custom wrappers for every new model integration. These benefits simplify maintenance, promote ecosystem-wide compatibility, and ensure that tool definitions are portable and consistent, which is essential for scaling complex AI-agent architectures across diverse deployment environments.

Exam trap

Candidates often confuse custom REST wrapper benefits with MCP advantages, missing that MCP's primary value lies in protocol standardization and discovery.

37
MCQmedium

An architect is integrating an MCP server with a legacy inventory system that exposes a SOAP API. The MCP server must translate tool calls into SOAP requests. The SOAP API is slow and occasionally returns faults. Which design choice best ensures that the model can recover gracefully from SOAP faults without hallucinating inventory data?

A.Configure the tool to return an empty array on SOAP faults so the model sees an empty inventory.
B.Set a very long timeout on the SOAP client so the model waits until the API eventually responds, and if it times out, return a generic 'error' string.
C.Catch SOAP faults in the MCP server and return a structured error object with a clear message type, such as 'inventory_unavailable', and no data fields.
D.Return the raw SOAP fault XML as the tool result and let the model interpret it.
AnswerC

A structured error object with a clear type and no data fields prevents the model from inventing inventory values. It signals that the operation failed, so the model can report the issue or retry without fabricating results. This separation of success and error paths is essential for reliable tool use.

Why this answer

Catching SOAP faults and returning a structured error object with no data fields prevents the model from fabricating inventory data. The clear error type allows the model to communicate the failure or trigger a retry. This design keeps the tool's success and error paths distinct, which is critical for trustworthy behavior.

Exam trap

The trap here is assuming that returning empty or generic error responses is safe, when in fact they can lead the model to invent data or misinterpret the outcome.

38
Multi-Selecthard

An architect is designing an MCP server that exposes several tools for a document management system. The tools include 'create_document', 'update_document', 'delete_document', and 'search_documents'. The architect wants to minimize the risk of the model accidentally invoking destructive tools during exploratory or read-only tasks. Which two design choices should the architect implement? (Choose two.)

Select 2 answers
A.Add a 'confirm' boolean parameter to each destructive tool that the model must set to true, and document in the tool description that it should only be set after user approval.
B.Implement a human-in-the-loop approval step for destructive tool invocations, where the MCP server pauses and requests confirmation from the user before executing.
C.Separate read-only tools from write tools into different MCP servers, and only enable the write server when the task explicitly requires modification.
D.Log all tool invocations and review the logs periodically to detect accidental destructive actions after they occur.
E.Rename destructive tools with a prefix like 'admin_' to signal their risk, and rely on the model to avoid them unless instructed.
AnswersB, C

Human-in-the-loop approval creates a mandatory checkpoint that the model cannot bypass. Even if the model attempts a destructive action, execution is halted until a human confirms. This is a strong control for high-risk operations and directly addresses the risk of accidental invocation during exploratory tasks.

Why this answer

Separating read-only and write tools into different servers, and requiring human approval for destructive actions, are both preventive controls. They ensure that during exploratory tasks, destructive tools are either not exposed or cannot execute without explicit human consent. These measures directly reduce the likelihood of accidental invocation.

Exam trap

The trap here is relying on model-facing hints or post-hoc logging as safety measures, when only architectural separation and human approval provide enforceable prevention.

39
Multi-Selectmedium

An organization is transitioning from individual, hard-coded tool integrations to a Model Context Protocol (MCP) architecture. Which TWO benefits will they most likely realize from this change?

Select 2 answers
A.Reduced latency for all model inferences by bypassing the need for JSON schema validation.
B.Improved interoperability, allowing the same tool server to be used across different host applications.
C.Automatic translation of model outputs into multiple programming languages for direct execution.
D.Simplified discovery and integration of new data sources through a standardized protocol.
E.Elimination of the need for API keys or authentication when connecting to external web services.
AnswersB, D

One of the core strengths of MCP is its standardized communication layer, which allows a single server to serve multiple different clients or hosts. This eliminates the need to rewrite tool integration logic for every new application, fostering a more modular and reusable ecosystem of AI tools.

Why this answer

Transitioning to MCP offers significant architectural advantages over traditional custom tool implementations. It standardizes how models interact with external data and services, promoting modularity and reducing the maintenance burden. Architects must understand these benefits to justify the adoption of MCP in complex enterprise environments involving multiple data sources.

Exam trap

Test-takers often look for custom protocol development options, missing that MCP specifically standardizes integration across multiple host applications.

40
MCQeasy

An architect is defining the input schema for an MCP tool that schedules a meeting. The schema currently accepts a free-form string for the start time, and the model frequently sends ambiguous values such as "next Tuesday afternoon." Which change best improves reliability?

A.Change the start time field to a JSON Schema string with format "date-time" and add a separate timezone field with an enum of IANA time zone names.
B.Add a natural-language description telling the model to always use ISO 8601 format.
C.Accept the free-form string and have the server parse it with a natural-language date library before scheduling.
D.Replace the start time with separate integer fields for hour and minute and let the client supply the date.
AnswerA

Using JSON Schema's date-time format gives the model a precise, machine-checkable contract, and an enum for time zones eliminates ambiguity about offsets and daylight saving behavior. The server can reject invalid input before making any scheduling call. This is the standard way to express temporal inputs in MCP tool schemas.

Why this answer

JSON Schema formats and enums turn an ambiguous free-form field into a precise contract the model can satisfy and the server can validate. A date-time format standardizes the timestamp, while an IANA time zone enum removes offset and daylight saving ambiguity. This reduces invalid calls and eliminates the need for fragile natural-language parsing on the server.

Exam trap

The trap here is believing a descriptive instruction is as reliable as a schema constraint, when only the schema guarantees the shape of the input.

41
MCQhard

Refer to the exhibit. An architect is configuring an MCP server to provide read-only access to a SQLite database. What is the primary reason for using the 'env' field in this configuration?

A.To specify the transport protocol that the MCP host should use to communicate with the SQLite server.
B.To provide the necessary database credentials and enforce runtime constraints like read-only access.
C.To define the JSON schema for the tools that the SQLite server will expose to the model.
D.To increase the memory allocation for the 'uvx' command to handle larger database queries.
AnswerB

The 'env' field allows the host to inject configuration settings directly into the server's environment. In this case, setting 'SQLITE_READONLY' ensures the server logic restricts database operations to queries only, providing a critical layer of security that the model cannot bypass through prompt manipulation.

Why this answer

The configuration of MCP servers involves defining how the host process should launch and communicate with the server. Using environment variables is a standard method for passing configuration and security constraints to the server process. This ensures that the server operates within the intended security boundaries, such as read-only mode, regardless of the model's requests.

Exam trap

Candidates often mistake the 'env' field for a way to configure the model's behavior, whereas it is actually intended for passing secure credentials and runtime constraints directly to the server process instance.

42
MCQhard

Refer to the exhibit. The model fails to return accurate data when the user asks for metrics over a 'five minute' interval. What is the most likely cause?

A.The tool name 'get_system_metrics' is not unique enough to be invoked correctly.
B.The inputSchema lacks explicit constraints or a more descriptive instruction for the argument.
C.The MCP server is missing a required 'outputSchema' field in the definition.
D.The model is unable to handle more than one argument for an MCP tool.
AnswerB

The schema fails to define expected formats or units, leaving the model to guess how to map 'five minutes' to the string 'interval'. Adding explicit documentation or constraining the input to a numeric type would guide the model to provide the correctly formatted data the backend logic requires.

Why this answer

The tool definition requires a string input but does not specify the expected unit or format (e.g., ISO8601 or seconds as an integer). Because the model cannot infer that 'five minutes' must be converted to '300' seconds, it passes the raw input, causing the backend to fail. Improving the schema with a description specifying unit requirements is essential for robust tool interaction.

Exam trap

Many candidates think the model can automatically deduce unit requirements like converting minutes to seconds without explicit schema instructions.

43
MCQeasy

Which of the following describes the purpose of the 'resources' feature in MCP?

A.To allow the model to execute long-running background tasks on the server.
B.To provide the model with read-only access to external data entities.
C.To allow the model to modify persistent settings in the server's configuration.
D.To maintain state between different MCP client sessions across the network.
AnswerB

Resources provide a standardized way to expose data to the model. By separating data retrieval (resources) from functional actions (tools), the MCP architecture enables a clean, predictable way for models to gather the context they need without accidentally triggering actions while simply trying to read file contents.

Why this answer

MCP resources are designed for the model to read and utilize data from external sources, such as configuration files, logs, or documentation. Unlike tools, which are meant for taking actions, resources represent data objects. They allow the model to ingest context from the environment efficiently, which is a fundamental requirement for building agents that need to be aware of their surroundings to perform accurate task execution.

Exam trap

Test-takers frequently confuse MCP resources with tools, assuming resources can modify state or execute actions, whereas they are strictly restricted to read-only data access.

44
MCQmedium

An architect is reviewing an MCP server where one tool returns a 2 MB JSON payload of raw database rows. The model's responses have become slow and occasionally drop details from the middle of the payload. Which change best addresses the observed behavior while preserving the tool's usefulness?

A.Return a summarized or paginated subset of the rows, with the tool schema exposing parameters for filtering and page size.
B.Increase the model's context window and continue returning the full 2 MB payload on every call.
C.Compress the 2 MB payload with gzip and return the binary blob in the tool result.
D.Move the payload into an MCP resource and have the tool return only a resource URI for the model to fetch.
AnswerA

Returning a bounded, relevant subset keeps the payload within a size the model can attend to reliably, and exposing filter and pagination parameters lets the model request more data when needed. This preserves the tool's usefulness while eliminating the middle-loss and latency caused by oversized results. It also aligns response size with the query's actual intent.

Why this answer

Oversized tool results degrade latency and cause the model to lose details buried in low-signal data. Returning a summarized or paginated subset, with schema parameters that let the model filter and page, keeps each result within a size the model can attend to while preserving access to the full dataset on demand. Expanding context, compressing bytes, or deferring to a resource does not reduce the semantic volume the model must process.

Exam trap

The trap here is equating a larger context window with the ability to use very large tool results effectively, when relevance and signal density matter more than raw capacity.

45
MCQmedium

During an MCP tool invocation, a user asks Claude to look up an order by its ID. The MCP server's tool handler returns a successful result, but the response payload is 12 MB of raw JSON containing nested line items, shipping events, and audit metadata. Claude's reply to the user is vague and omits key order details. Which change to the MCP tool design best addresses this?

A.Raise the MCP server's request timeout so the 12 MB response can be fully streamed before Claude processes it.
B.Return only a compact, task-relevant projection of the order data from the MCP server, with pagination or a detail-fetch tool for anything further.
C.Add a system prompt instruction telling Claude to always ignore audit metadata and shipping events when answering order questions.
D.Increase the max_tokens setting on the Claude request so the model has more room to summarize the 12 MB payload.
AnswerB

Large payloads dilute the model's attention and crowd out the user's actual question. Returning a small, purpose-built projection such as order status, total, and estimated delivery keeps the signal high, and offering a separate detail tool or pagination lets the model pull deeper data only when the conversation requires it. This is the standard MCP tool-design pattern for verbose upstream systems.

Why this answer

The tool returned successfully, so transport, timeouts, and output token limits are not the issue. The failure is context quality: a 12 MB nested payload buries the fields the user cares about and degrades the model's answer. Shrinking the tool result to a task-relevant projection, and exposing deeper data through pagination or a dedicated detail tool, restores precision without losing capability.

Exam trap

The trap here is assuming a successful tool call means the tool design is correct, when an oversized or unfocused result payload can still degrade the answer.

46
MCQmedium

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?

A.Register a second tool called `validate_location` and rely on the model to call it before `fetch_weather`.
B.Increase the max_tokens setting on the Claude API request so the model has more room to reason about the location.
C.Add a `description` to the `location` property that states the accepted formats and supported regions.
D.Change the `location` type from string to number so the model is forced to send a numeric postal code.
AnswerC

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.

Why this answer

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.

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.

47
MCQhard

When designing tools for a highly regulated environment, what is the most important architectural goal?

A.Maximizing the model's autonomy to perform complex, multi-step tasks.
B.Ensuring the model can access as much data as possible to be effective.
C.Providing complete observability and strict access controls for every tool call.
D.Optimizing for the lowest possible latency in every tool interaction.
AnswerC

Observability and strict access controls are the cornerstones of compliant architecture. By logging every call and enforcing precise authorization, the system provides the proof of compliance required by auditors. This setup allows the organization to leverage LLM capabilities while maintaining the security posture demanded by strictly regulated operational environments.

Why this answer

In regulated environments, auditability and deterministic control are the primary architectural drivers. Every tool invocation must be logged with its full context, including the user, input, and response. This provides a complete audit trail that is necessary for compliance.

Coupled with least-privilege design, this ensures that every model interaction is traceable and restricted, meeting the strict security standards required by enterprise compliance frameworks like CCAR-F.

Exam trap

Candidates frequently focus on model performance or feature richness rather than the specific compliance requirements of regulated environments, neglecting the necessity of audit trails and deterministic control for every single tool invocation.

48
MCQmedium

Which approach is best for handling binary data (like images) in an MCP tool integration?

A.Base64 encode the binary data and send it as a string argument in the tool call.
B.Pass a URI that points to the binary file location to the tool.
C.Convert the binary data into a text-based representation using a custom parser.
D.Store the data in the model's persistent context memory.
AnswerB

Using URIs ensures the tool call remains lightweight and compliant with protocol standards. The server can then resolve the URI and access the binary data directly, avoiding the overhead of transferring raw bytes through the model's communication loop, which is essential for scaling MCP server performance.

Why this answer

Binary data should be handled by passing a reference (such as a URI) rather than embedding the raw binary data directly in the JSON tool arguments. Embedding raw data exceeds token limits and complicates the communication protocol. Using URIs keeps the payloads small and efficient, allowing the server to fetch the binary content independently when needed, which is the recommended architectural pattern for MCP.

Exam trap

Candidates often think they should embed raw base64 binary data directly into the JSON tool arguments, ignoring token limit constraints and payload bloat.

49
MCQhard

An MCP server exposes a `query_orders` tool whose input schema includes a `filters` object with several optional properties. The model intermittently omits required nested fields inside `filters`, and the server returns a generic 400 error. The architect wants the model to reliably produce schema-valid arguments and recover from validation failures. Which combination of MCP features should the architect implement?

A.Return a plain text error string from the tool handler and instruct the model in the system prompt to always include all fields.
B.Set `inputSchema` to a permissive object and rely on the server to coerce missing fields to defaults silently.
C.Split `query_orders` into one tool per filter field so each tool has a single scalar input.
D.Use `inputSchema` with `required` arrays and property descriptions, and return `isError: true` with a structured message naming the missing field.
AnswerD

Declaring required nested fields in the JSON Schema gives the model a machine-readable contract, while returning `isError: true` with a structured message tells the model exactly what to fix on retry. Together they close the loop: the model knows the constraint up front and receives actionable feedback when it still fails. This is the intended MCP pattern for validation and recovery.

Why this answer

The MCP contract has two halves: the input schema that declares required nested properties, and the tool result that reports validation failures. Declaring `required` arrays with descriptive properties guides argument construction, while returning `isError: true` with a structured message that names the missing field gives the model a concrete correction target. Permissive schemas, plain text errors, and tool fragmentation each leave one half of the loop open.

Exam trap

The trap here is treating schema validation and error reporting as alternatives, when the reliable pattern requires both the declared contract and structured failure feedback.

50
MCQeasy

An architect is preparing an MCP server for a code review tool. The tool 'review_code' takes a 'language' parameter and a 'code_snippet' parameter. The architect wants to ensure the model provides valid language values and that the snippet is not excessively large. Which combination of JSON Schema constraints should be applied to the tool definition?

A.Use a numeric type for 'language' and a maximum value for 'code_snippet'.
B.Use an enum for 'language' and a maxLength constraint for 'code_snippet'.
C.Use an array of strings for 'language' and an object type for 'code_snippet'.
D.Use a regex pattern for 'language' and a minLength constraint for 'code_snippet'.
AnswerB

An enum restricts 'language' to a predefined set of valid values, ensuring the model cannot send unsupported languages. A maxLength constraint on 'code_snippet' prevents excessively large inputs that could exceed token or processing limits. Together, these schema constraints enforce valid and bounded input at the protocol level.

Why this answer

Using an enum for 'language' restricts the model to supported values, and a maxLength constraint on 'code_snippet' bounds the input size. These are standard JSON Schema keywords that directly address the requirements. They are simple, declarative, and enforced by the MCP server, making them the most appropriate choice.

Exam trap

The trap here is confusing validation mechanisms, such as using a regex or minLength when an enum and maxLength are the precise tools for the stated constraints.

51
MCQhard

An MCP server wraps a ticketing API. The API accepts a `priority` field whose valid values are `low`, `medium`, and `high`. During testing, the model occasionally sends `urgent`, and the API returns a generic 400 error. The architect wants the model to self-correct on the next turn without changing the upstream API. Which change to the MCP tool best achieves this?

A.Map any unrecognized priority to `medium` inside the server before forwarding the request.
B.Add an `enum` of `low`, `medium`, and `high` to the `priority` field in the tool's input schema.
C.Return the upstream 400 error text verbatim to the model and let it infer the allowed values.
D.Add a free-text `notes` field where the model can explain its intended priority in prose.
AnswerB

Declaring the allowed values in the schema tells the model the valid set before it calls, which prevents most invalid values and gives it a clear correction target when a call is rejected. It also documents the contract for future maintainers. The upstream API stays untouched, satisfying the stated constraint.

Why this answer

Encoding the allowed values as an enum in the tool schema is the cleanest fix because it prevents invalid submissions and, when a call is still rejected, gives the model an explicit set to choose from on the retry. Silently coercing values hides errors, and passing raw upstream errors through leaves the model guessing. The schema is the right place for this contract.

Exam trap

The trap here is choosing silent normalization or raw error passthrough instead of expressing the valid value set in the tool schema.

52
MCQmedium

How does providing a large number of complex tool definitions in a single request impact the performance and behavior of Claude?

A.It has no impact on performance because tool definitions are stored in a separate, dedicated memory buffer.
B.It increases the cost and latency of every request while potentially decreasing the accuracy of tool selection.
C.It improves the model's reasoning capabilities by giving it more 'cognitive tools' to solve complex problems.
D.It allows the model to execute multiple tools in parallel without increasing the total number of tokens used.
AnswerB

Each tool definition adds tokens to the input, increasing the cost and the time required for the model to process the prompt. Furthermore, a 'crowded' tool space makes it more difficult for the model to distinguish between similar tools, which can lead to frequent hallucinations or incorrect tool choices.

Why this answer

The quantity and complexity of tool definitions directly affect the model's performance. Architects must balance the utility of available tools with the constraints of the model's context window and its ability to reason over multiple options. Excessive tool definitions can lead to increased costs, higher latency, and a higher probability of tool selection errors.

Exam trap

Candidates often assume that providing more tools is always better for capability, ignoring how excessive definitions degrade model accuracy and increase latency.

53
MCQeasy

A team is exposing an existing internal REST API to Claude through an MCP server. The API requires an OAuth 2.0 bearer token per user, and the team wants each user's Claude session to act with that user's own permissions. Where should the per-user OAuth token be handled in the MCP architecture?

A.Return the token to the model in the tool result and instruct the model to include it in subsequent calls.
B.Have the MCP server obtain and hold the user's OAuth token, attaching it to outbound API calls on the user's behalf.
C.Store a single shared service account token in the server's environment variables and use it for all users.
D.Embed the token in the tool's `inputSchema` so the model passes it as an argument on every call.
AnswerB

The MCP server is the trust boundary between the model and the upstream API. By acquiring the user's OAuth token through the client's authorization flow and attaching it to outbound requests, the server enforces per-user permissions without exposing secrets to the model. This keeps the tool schema free of credentials and preserves isolation across sessions.

Why this answer

Per-user authorization requires the MCP server to act as the trust boundary: it acquires each user's OAuth token through the client's authorization flow and attaches it to outbound API calls. This preserves least privilege and isolation while keeping credentials out of the model's context and the tool schema. Shared service accounts, schema-embedded tokens, and tokens returned in results all break the isolation or leak secrets.

Exam trap

The trap here is assuming the model should carry credentials because it orchestrates tool calls, when in fact the MCP server must own authentication and authorization.

54
MCQmedium

An architect is building an MCP server that exposes a tool for querying an PostgreSQL database. The tool's input schema defines a single property 'query' of type string. During testing, the model generates SQL statements that include multiple statements separated by semicolons, causing unintended data modifications. Which change to the tool design best mitigates this risk while preserving the tool's usefulness?

A.Parse the SQL string and reject any input containing more than one statement before execution.
B.Add a separate boolean input property 'allowMultipleStatements' defaulting to false.
C.Change the tool to accept a structured object with separate properties for table, columns, and where clause.
D.Change the 'query' property to an enum of pre-approved SQL statement templates.
AnswerA

Parsing and rejecting multi-statement input enforces a single-statement policy at the server, independent of model behavior. It preserves the ability to run arbitrary single SELECT statements while blocking the dangerous pattern of stacked statements. This is a robust, deterministic validation that directly addresses the root cause without reducing legitimate functionality.

Why this answer

The correct approach is to validate the SQL input at the MCP server and reject any input that contains more than one statement. This enforces a strict single-statement policy regardless of how the model formats its request. It keeps the tool flexible for legitimate single-statement queries while eliminating the risk of stacked statements that could modify data unexpectedly.

Exam trap

The trap here is assuming that adding a boolean flag or schema constraint will prevent the model from generating multi-statement SQL, when in fact only server-side parsing and rejection provides a reliable control.

Ready to test yourself?

Try a timed practice session using only Tool Design and MCP Integration questions.