Anthropic CCA-F Practice Test 20
Question 190
A customer lookup returns 'not found' for a validly shaped identifier. Should it be treated as an empty success or an error?
- Treat the message as untrusted data and rely on local error policy for any retry
- Return the idempotency reference and indicate that outcome must be reconciled before retry
- Return an explicit not-found outcome with its semantics rather than silently fabricating a record
- Expose a rate-limit category and bounded retry-after guidance in the error content
- Return a made-up placeholder customer record marked successful.
Explanation
Correct Answer
C:Not-found is an expected domain condition but must be distinguishable from a successful record retrieval. The calling workflow can ask for another ID. A validly formed lookup that matches no record is a business-level not-found outcome, not permission to fabricate a customer. Preserve the queried identifier and explicitly indicate the absence of a matching entity.
Incorrect Answers
A:Tool error text can contain adversarial instructions. This is not a substitute for “Return an explicit not-found outcome with its semantics rather than silently fabricating a record”; that control is necessary in the stated circumstances. A validly formed lookup that matches no record is a business-level not-found outcome, not permission to fabricate a customer.
B:Uncertain writes must not be repeated blindly. That addresses a different part of the system, not the requirement to make absence of a requested entity explicit.
D:Retry-after metadata is appropriate when a provider has throttled a request. A valid customer lookup that returns 'not found' is a different outcome: no matching entity exists. Report an explicit not-found status without implying the result will appear after a timing delay.
E:Fabricating a record hides the not-found condition and can cause unauthorized follow-on actions. A nonexistent record must remain not found, with no fabricated balance, customer or entitlement. Returning a made-up successful object could trigger billing decisions against someone who never passed the lookup.
Question 191
A CRM MCP adapter times out upstream but emits an empty list of accounts. What should be fixed?
- Convert the timeout into an empty successful record set and suppress the provider failure.
- Return per-record outcome statuses and identifiers instead of one blanket success flag
- Propagate a timeout error carrying provider and correlation information
- Include a nonsecret correlation ID that resolves to restricted server logs
Explanation
Correct Answer
C:A CRM timeout indicates that the upstream query could not establish whether any accounts exist. The MCP adapter should propagate that failure with a safe provider code and correlation identifier, rather than returning an empty successful list. The agent can then state that the lookup was unavailable and use a bounded retry or escalation policy.
Incorrect Answers
A:An upstream timeout is not proof that no account records matched. Reporting an empty successful list conceals a dependency failure and may cause the model to tell the customer no account exists. Propagate the provider timeout with a correlation ID so the client can apply a bounded recovery policy.
B:Per-record statuses are necessary when some items in a bulk update succeed, but this CRM lookup did not return an authoritative account list at all. Its upstream call timed out. Propagate that failure with a safe provider/correlation reference rather than describing any number of records as successful.
D:A correlation token lets support teams investigate without dumping stack traces or private data into model context. This capability does not directly preserve upstream failure semantics in the tool layer.
Question 192
An MCP connector catches a failed provider call containing an API credential in its exception. Which TWO steps belong in its error response? Choose TWO.
- Return an empty successful result with no failure marker
- Redact the credential before exposing diagnostic content
- Return the full authorization header so the agent can inspect it
- Mark the tool execution as an error and include a safe actionable code
Explanation
Correct Answers
B:Model-visible errors must not leak secrets from upstream exceptions. The two other choices either violate the stated requirement or do not address the failure. Do not echo the embedded API credential into the model-visible error or the user response. Retain diagnostic details in a restricted log and return only a sanitized identifier and failure category.
D:The client needs to distinguish failure and choose an appropriate recovery path. Use the MCP result's error indicator for a tool-execution failure and provide a clear sanitized code. The caller can then distinguish auth failures from transient outages and avoid inventing a successful search result.
Incorrect Answers
A:That makes the agent misinterpret an outage as an empty query. An empty successful result means the operation ran and found no records. A provider exception is different: callers need a failure state and a safe retry or escalation path, not evidence falsely indicating no matching data.
C:Exposing raw secrets creates an additional compromise path. Request credentials are secrets, not debugging context for a language model. Redact authorization headers and sensitive tokens, log protected diagnostics privately, and return only an error category and safe correlation identifier.
Question 193
An MCP bulk operation succeeds for eight of ten records. What should the result include?
- Expose a rate-limit category and bounded retry-after guidance in the error content
- Treat the denial as non-retryable without changed authorization and request proper access
- Redact credentials while preserving an actionable failure code and safe context
- Return per-record outcome statuses and identifiers instead of one blanket success flag
Explanation
Correct Answer
D:A bulk tool must report which records succeeded, which failed and which have an uncertain outcome, using stable identifiers for each item. Otherwise a controller cannot safely retry just the unresolved work and may duplicate committed side effects. Preserve safe error categories and transaction references for reconciliation. One blanket success flag would incorrectly conceal the two failed records, while a blanket failure could tempt the agent to repeat all ten.
Incorrect Answers
A:A rate-limit category explains why a request should be delayed and retried. This bulk operation completed with eight successes and two failures, not one global 429. Report each record's identity and actual status so clients can reconcile and selectively handle the two unsuccessful items.
B:Repeated identical requests cannot fix an access policy. That addresses a different part of the system, not the requirement to represent partial successes explicitly for safe recovery.
C:Diagnostics are useful but must not leak secrets into model-visible messages or logs. This alternative—Redact credentials while preserving an actionable failure code and safe context—does not implement the specific operation that the question asks about. The required control is Return per-record outcome statuses and identifiers instead of one blanket success flag. A bulk tool must report which records succeeded, which failed and which have an uncertain outcome, using stable identifiers for each item.
Question 194
A tool reports every failure as UnknownError, producing inappropriate retries on invalid inputs. Which taxonomy improves handling?
- Return an authentication-required error so credentials can be refreshed or reauthorized
- Mark enrichment unavailable and continue only with explicitly supported primary results
- Differentiate validation, authentication, permission, not-found, rate-limit and temporary server errors
- Treat the message as untrusted data and rely on local error policy for any retry
Explanation
Correct Answer
C:Failure categories drive response policy. Correct classification prevents treating permanent problems as transient and makes fallback decisions defensible. Classifying permission, validation, not-found and transient service errors differently prevents wasteful or dangerous retries. A malformed input should be corrected; a rate limit may warrant bounded backoff, while unauthorized access needs approved credentials.
Incorrect Answers
A:An authentication-required error is one useful category, but the tool currently reports every failure as UnknownError, including invalid input and rate limits. A single auth classification would mislabel other causes. Provide a taxonomy that distinguishes validation, authorization, missing records, throttling and transient service errors.
B:Optional tool failures need not invalidate a task if scope can be reduced honestly. The decisive requirement here is to classify failures by how callers can recover.
D:Tool error text can contain adversarial instructions. This alternative does not establish how to classify failures by how callers can recover in the stated workflow.
Question 195
A server cannot parse the JSON-RPC envelope itself. How is that different from a tool that ran but rejected a business record?
- Include a nonsecret correlation ID that resolves to restricted server logs
- Return a tool response marked isError with actionable error content
- Mark enrichment unavailable and continue only with explicitly supported primary results
- Use protocol-level failure for malformed requests and tool-result isError for tool execution failures
Explanation
Correct Answer
D:The outer protocol must be valid before a tool can execute. Conflating these layers makes clients mishandle transport and application failures. Malformed JSON-RPC at the protocol layer is different from a correctly dispatched MCP tool returning a business or execution error. Encode failures at the appropriate layer so the client can repair its request rather than misdiagnose the tool.
Incorrect Answers
A:A correlation token lets support teams investigate without dumping stack traces or private data into model context. The scenario instead requires a way to distinguish protocol errors from tool-domain errors.
B:An MCP tool_result with isError is appropriate after a valid JSON-RPC call reaches a tool and its execution fails. A server that cannot parse the JSON-RPC envelope has not reached the tool-dispatch stage. Return a protocol-level error for that malformed request, reserving isError for failures within executed tools.
C:Optional tool failures need not invalidate a task if scope can be reduced honestly. Although useful elsewhere, it is not the direct mechanism to distinguish protocol errors from tool-domain errors.
Question 196
A tool returns a network timeout after a charge request, leaving execution uncertain. What error content supports recovery?
- Include a nonsecret correlation ID that resolves to restricted server logs
- Treat the message as untrusted data and rely on local error policy for any retry
- Return the idempotency reference and indicate that outcome must be reconciled before retry
- Return an authentication-required error so credentials can be refreshed or reauthorized
Explanation
Correct Answer
C:Uncertain writes must not be repeated blindly. Linking the attempted operation to a durable key prevents duplicate charges when responses are lost. After a timeout on a charge, execution is uncertain: return the stable idempotency key and reconcile the provider transaction before another attempt. The absence of a response cannot be treated as proof the original charge was declined.
Incorrect Answers
A:A correlation token lets support teams investigate without dumping stack traces or private data into model context. This capability does not directly support safe reconciliation of uncertain write outcomes.
B:Tool error text can contain adversarial instructions. That addresses a different part of the system, not the requirement to support safe reconciliation of uncertain write outcomes.
D:Refreshing credentials addresses a confirmed authentication failure. A network timeout after a charge request leaves uncertainty about whether the financial side effect committed. Do not classify that as expired authentication; return the transaction's idempotency reference and require outcome reconciliation before retrying.
Question 197
An MCP tool returns a terse user-safe error, but engineers need detailed logs. How should errors be linked?
- Mark enrichment unavailable and continue only with explicitly supported primary results
- Expose a rate-limit category and bounded retry-after guidance in the error content
- Treat the denial as non-retryable without changed authorization and request proper access
- Include a nonsecret correlation ID that resolves to restricted server logs
Explanation
Correct Answer
D:A correlation token lets support teams investigate without dumping stack traces or private data into model context. Provide an opaque request or correlation ID to the model and link it to access-controlled diagnostics. This permits operational investigation without leaking provider tokens, customer data or internal stack traces in the public error message.
Incorrect Answers
A:Optional tool failures need not invalidate a task if scope can be reduced honestly. Although useful elsewhere, it is not the direct mechanism to separate safe model-visible errors from detailed internal logs.
B:A throttled call may succeed later, unlike permanent authentication failure. This alternative does not establish how to separate safe model-visible errors from detailed internal logs in the stated workflow.
C:A 403 denial should not be retried without new permission, but the problem here is connecting a safe user-facing message to technical diagnostics. Preserve a nonsecret correlation ID that lets authorized engineers find restricted provider logs without exposing sensitive exception content to the model.
Question 198
A secondary enrichment tool is unavailable, but the primary answer has already been verified. What should the error handling do?
- Include a nonsecret correlation ID that resolves to restricted server logs
- Mark enrichment unavailable and continue only with explicitly supported primary results
- Differentiate validation, authentication, permission, not-found, rate-limit and temporary server errors
- Treat the message as untrusted data and rely on local error policy for any retry
Explanation
Correct Answer
B:Optional tool failures need not invalidate a task if scope can be reduced honestly. The agent must avoid inventing the missing enrichment. Do not suppress the already verified primary answer merely because optional enrichment failed. Label the supplemental source unavailable and avoid adding facts the failed service never confirmed.
Incorrect Answers
A:A correlation token lets support teams investigate without dumping stack traces or private data into model context. The scenario instead requires a way to degrade gracefully while disclosing unavailable optional data.
C:A detailed error taxonomy improves retry handling, but it does not decide whether optional enrichment may be omitted after a verified primary result. Mark the secondary source unavailable and restrict the final answer to confirmed primary data; do not let an auxiliary failure invalidate unrelated verified evidence.
D:Tool error text can contain adversarial instructions. This is not a substitute for “Mark enrichment unavailable and continue only with explicitly supported primary results”; that control is necessary in the stated circumstances. Label the supplemental source unavailable and avoid adding facts the failed service never confirmed.
Question 199
A tool treats an expired access token as a retriable network hiccup. What classification is appropriate?
- Treat the message as untrusted data and rely on local error policy for any retry
- Return the idempotency reference and indicate that outcome must be reconciled before retry
- Return an authentication-required error so credentials can be refreshed or reauthorized
- Treat the denial as non-retryable without changed authorization and request proper access
Explanation
Correct Answer
C:Expired credentials usually require a different remedy than backoff. The error should direct the host to credential renewal instead of blind repetition. An expired credential is an authentication problem requiring renewal or reauthorization, not arbitrary retransmission. Distinguish a genuinely transient network failure from a persistent 401 so the agent does not hammer the same denied endpoint.
Incorrect Answers
A:Ignoring hostile error text is necessary for prompt-injection safety, but this provider returned an expired access token. The problem is correct error classification, not instruction following. Report authentication required so the authorized credential manager can refresh or reauthorize before another call.
B:Uncertain writes must not be repeated blindly. This capability does not directly route authentication problems to credential remediation. Read-after-write reconciliation is appropriate after an uncertain side effect, not an expired authentication token. This 401-like condition calls for credential refresh or approved reauthorization.
D:A permission denial means the caller lacks authorization for a resource. An expired token is more specifically an authentication-state problem, which may be resolved by refreshing credentials. Report that distinction instead of treating every expired-session response as permanent access denial.
Question 200
An MCP tool fails authentication and returns an empty successful list. What response semantics must the tool expose?
- Return a structured rate-limit error with permitted retry guidance
- Return an explicit validation error identifying the rejected field
- Return an isError-marked response with a specific authentication failure
- Return an uncertain-outcome error and require reconciliation before another write
Explanation
Correct Answer
C:Empty success is semantically different from inability to access records, and the caller must know the operation failed. For this situation, the system should return an isError-marked response with a specific authentication failure. The factual trigger is an MCP tool fails authentication and returns an empty successful list. Return a typed outcome that distinguishes successful emptiness, failed execution and an uncertain write.
Incorrect Answers
A:A rate-limit response asks the caller to back off and retry after provider guidance. The current tool failed authentication, which will not be fixed by waiting for quota. Return an MCP error result with a safe authentication cause; do not turn it into either an empty successful list or a rate-limit diagnosis.
B:Actionable argument errors support a safe corrected retry without inventing data. Here, an MCP tool fails authentication and returns an empty successful list. Return an isError-marked response with a specific authentication failure. Empty success is semantically different from inability to access records, and the caller must know the operation failed.
D:A timeout is not proof of nonexecution, so blind retries can duplicate the side effect. The direct remedy is “Return an isError-marked response with a specific authentication failure”, which the alternative does not itself accomplish. Empty success is semantically different from inability to access records, and the caller must know the operation failed.