Question 160
A search tool paginates a fixed, unchanged dataset using an offset. It sorts only by relevance score, and many rows tie. Repeated calls return tied rows in different orders, causing skipped and repeated rows across pages. Which contract change directly addresses this problem?
- Increase the page size without changing the ordering rule.
- Deduplicate each page independently before returning it.
- Include the total result count while leaving score ties unordered.
- Add a stable unique secondary sort key to define a total ordering of tied results.
Explanation
Correct Answer
D:With a fixed dataset, a deterministic tie-breaker keeps every row at the same position across page requests. This fixes order instability without relying on a larger page or post hoc duplicate removal.
Incorrect Answers
A:Larger pages may reduce the number of boundaries but still leave unstable ties at those boundaries. The contract does not ensure a reproducible partition of results.
B:A duplicate can occur on a different page, and a skipped row cannot be recovered by removing duplicates. Local cleanup does not define a stable global order.
C:The count tells the caller how many rows exist but not which rows belong on each page. It cannot stabilize the offset boundaries.
Question 161
A tool can fail because of malformed input or temporary overload. What response contract helps recovery?
- Return a success flag with an error hidden in prose.
- Return the same unexplained error text for every failure.
- Provide a stable error category and useful retry or correction guidance.
- Return only human-readable prose with no stable category or actionable detail.
Explanation
Correct Answer
C:Structured failure semantics support targeted recovery without exposing unnecessary internals. Stable categories let the controller distinguish input correction, access resolution, and temporary retry. Human-readable detail should add useful context without contradicting the machine status.
Incorrect Answers
A:Conflicting status signals can advance the workflow incorrectly.
B:The caller cannot distinguish correction from retry needs.
D:Free text can explain an error, but an unstable undifferentiated contract makes reliable correction-versus-retry handling harder.
Question 162
A database error contains an internal credential string. What should the tool return to the model?
- A sanitized error with enough context for supported recovery.
- No result for the pending call.
- The entire stack trace unchanged.
- A fabricated success result.
Explanation
Correct Answer
A:Error reporting should preserve useful failure meaning while removing credentials and unnecessary internal details. The sanitized result should retain the failure category or safe diagnostic identifier needed for recovery. It should not expose raw connection strings simply because they appeared in an exception.
Incorrect Answers
B:Omitting the observation leaves the invocation unresolved.
C:Raw errors can leak secrets beyond what diagnosis requires.
D:Concealing failure produces misleading task state.
Question 163
A developer confuses a provider-executed server tool with an application-defined client tool. What should dispatch logic use?
- Whether the tool call finishes within the current HTTP request's latency.
- The documented tool type and execution lifecycle.
- Whether the returned tool name resembles a local function name.
- Whether the tool was listed before other tools in the request.
Explanation
Correct Answer
B:The host must distinguish operations it executes from those executed by the provider, including their result handling. Client tools require application execution and correlated observations; server tools follow their provider-managed lifecycle. Dispatch must not execute both paths for one request.
Incorrect Answers
A:Timing may vary for either execution type and is not a reliable definition of client versus server ownership.
C:Naming resemblance does not identify which runtime is responsible for the tool's execution.
D:Catalog order does not specify the component responsible for executing a requested operation.
Question 164
A desktop AI application connects to two MCP servers. Which component owns the overall user interaction and coordinates the clients?
- A resource published by either server.
- The schema validator used to check tool arguments.
- One server chosen to manage every other server automatically.
- The host application.
- The MCP client for the first connected server, which automatically becomes responsible for every other client's user interface and policy.
Explanation
Correct Answer
D:The host integrates user interaction, model context, and application policy. Its MCP clients maintain the server connections through which capabilities are discovered and used.
Incorrect Answers
A:Resources expose context, while the host coordinates the application's user experience and server connections.
B:Argument validation supports individual calls but does not own the host application's overall client coordination.
C:An MCP connection does not make one connected server the host of the entire desktop application.
E:A client participates in a particular server connection. The surrounding host application owns the broader composition and user interaction.
Question 165
A server provides a reusable investigation template with user-supplied arguments. Which MCP primitive most directly represents that template?
- A tool whose sole purpose is to return an unparameterized static string on every call.
- A prompt.
- A subscription notification announcing that a resource changed.
- A resource read that exposes a fixed document without an argument-instantiated prompt interface.
Explanation
Correct Answer
B:Prompts expose reusable message templates or workflows that clients can retrieve with arguments. A prompt packages reusable interaction instructions with arguments. It is different from a URI-addressed resource and from a callable operation that performs the investigation itself.
Incorrect Answers
A:A tool can return text, but the stated capability is a reusable, parameterized prompt template. MCP provides the prompt primitive to represent that interaction directly.
C:An update notification signals change; it does not define an argument-bearing investigation template for invocation.
D:A fixed resource can supply reference content, but the template's user-supplied arguments are directly represented by the prompt primitive.
Question 166
An MCP client needs to know which operations a connected server currently exposes. What should it use?
- Send the desired tool call immediately and use any unknown-tool errors as the sole method of learning the server's complete interface.
- Guess names from the server's hostname.
- Copy another server's cached tool list.
- Parse arbitrary words from a resource document as tool names.
- The protocol's tool discovery/listing mechanism.
Explanation
Correct Answer
E:Discovery supplies the server's exposed tool definitions, which the client can validate and present appropriately. Discovery returns the server's declared callable interfaces and schemas. Reading an arbitrary resource or guessing a function name does not establish that the operation is exposed.
Incorrect Answers
A:Failure-driven guesses cannot reliably enumerate the available operations or obtain their argument schemas. Discovery provides that interface explicitly.
B:Hostnames do not enumerate supported operations.
C:Capabilities can differ between servers and versions.
D:Document content is not an authoritative capability registry.
Question 167
A server signals that its tool list changed. What should a client that supports this notification do?
- Assume the notification authorizes every new tool automatically.
- Ignore changes permanently after the first connection.
- Refresh the tool definitions before relying on its stale catalog.
- Continue invoking removed tools until every one returns an execution error.
Explanation
Correct Answer
C:Capabilities can be added, removed, or changed. Refreshing prevents calls based on obsolete definitions. A catalog can change as integrations are updated or features become available. Refreshing definitions keeps future selection and argument construction aligned with the advertised interface.
Incorrect Answers
A:Discovery and authorization remain distinct decisions.
B:A fixed catalog can become inaccurate during operation.
D:Waiting for failed calls leaves the client using an avoidably stale catalog after notification.
Question 168
A resource is identified by a URI. What should a client avoid assuming?
- That access may require authorization.
- That every resource URI is a publicly fetchable HTTPS URL.
- That a supported resource-read operation can retrieve it.
- That the URI identifies the resource.
Explanation
Correct Answer
B:MCP resource identifiers can use other schemes and require server-mediated retrieval. Treating them as arbitrary web URLs can fail or bypass intended access handling. A resource URI can use an application-specific scheme resolved through its server. Treating it as an ordinary public web address can bypass the supported retrieval path or simply fail.
Incorrect Answers
A:Resource access can indeed be restricted.
C:That is normal when access and capability requirements are satisfied.
D:Identification is its intended role.
Question 169
A server lists thousands of resources. Must the client put every resource's full content into the model prompt?
- Yes, listing requires loading all bytes immediately.
- No; resources can never be used as model context.
- No; select and retrieve relevant resources within the task's context needs.
- Yes, unless every resource is a tool.
Explanation
Correct Answer
C:A catalog enables targeted access. Loading everything wastes context and may expose unnecessary information. Listing resource metadata tells the client what can be retrieved. Selective loading preserves context capacity for the resources the current task actually requires.
Incorrect Answers
A:Discovery and content retrieval are separate operations.
B:Resources are a standard way to provide contextual data.
D:Primitive type does not justify indiscriminate prompt loading.
Question 170
A client successfully authenticates to an MCP server. What additional decision may still be required for a sensitive tool?
- Whether successful tool discovery permits every listed operation.
- Whether the server's TLS certificate alone grants access to all accounts.
- Whether the authenticated identity is authorized for that operation and resource.
- Whether the token's mere presence is enough without checking its applicable scope.
Explanation
Correct Answer
C:Authentication identifies the caller's credential context. Authorization still has to determine whether that caller may perform the particular operation on the requested resource.
Incorrect Answers
A:A visible capability can still require operation- and resource-specific permission checks.
B:Transport authentication of the service does not authorize the user's operation on a particular account.
D:Possessing a token does not establish that it permits the requested sensitive action.