CCA-F Practice Test practice questions, page 5 of 6, with answer review and explanations.
Question 21
Your document extraction tool uses ML models to extract invoice fields (vendor, amount, date). The models return confidence scores (0.0-1.0) for each extracted field. In production, you observe: (1) the agent proceeds with low-confidence extractions that are incorrect 23% of the time, and (2) the agent requests unnecessary human review for 31% of extractions that were actually correct. How should you restructure the tool’s output?
Return fields with their raw confidence scores and add detailed few-shot examples to your system prompt demonstrating how to interpret different confidence ranges and when to request human review.
Return fields with confidence scores, plus a request_review boolean computed using your tested confidence thresholds, along with a review_reasons array explaining which fields triggered review.
Compute an aggregate extraction_quality score across all fields and return it alongside the extracted values. Include a text summary describing the overall extraction reliability.
Return fields organized into verified and needs_verification objects based on confidence thresholds.
Question 22
Your product search tool queries an external catalog API and returns matching items. In production, you observe the agent frequently retries searches immediately after receiving zero results, treating “no matches found” as a failure requiring retry. The external API returns HTTP 200 with an empty results array – a valid response. How should you restructure the tool’s result to help the agent correctly interpret empty result sets?
Add a suggestions field containing alternative search strategies when results are empty, helping guide the agent toward more productive follow-up queries.
Return a natural language string describing the outcome, allowing the agent to interpret the result contextually based on the message content.
Return a result object with isError: true and a message explaining no products matched.
Return a structured result with a success boolean and results array, reserving isError: true for actual execution failures only.
Question 23
Your MCP server includes archive_file(file_id) and delete_file(file_id) tools. Production logs show the agent calls delete_file when users ask to “remove old backups,” but company policy requires archiving backup files. Both tools currently have minimal descriptions: “Archives a file” and “Deletes a file.” Which change most directly improves tool selection for this scenario?
Expand tool descriptions to clarify use cases, adding guidance like “Do not use for backup files” to delete_file.
Add a confirmation step that requires users to type “CONFIRM DELETE” before delete_file executes.
Implement server-side validation that rejects delete_file calls for files tagged as backups, returning an error message suggesting archive_file.
Add few-shot examples to the system prompt demonstrating that requests involving “backup” or “old” should use archive_file.
Question 24
Your track_shipment(tracking_id) tool queries an external logistics API that sometimes fails – the API may be temporarily unavailable, the tracking ID may be malformed, or the shipment may not exist. Currently, your tool raises a Python exception when errors occur. Users report the agent gives unhelpful responses like “I’m having trouble with that request” instead of suggesting alternatives such as verifying the tracking number format or checking by order number. How should you handle errors in tool results?
Return a generic error response (e.g., {"success": false, "error": "lookup_failed"}) for all failure cases to maintain a consistent schema and avoid exposing internal error details.
Return structured error information as normal tool output including error type, recoverability status, and actionable context for the user.
Create dedicated error-recovery tools (retry_tracking_lookup, search_by_order_number) that the model can invoke after the primary tracking tool returns a failure indicator.
Implement retry logic with exponential backoff inside the tool implementation so transient errors are automatically handled and only return a result after all retry attempts are exhausted.
Question 25
Your MCP server implements a check_availability tool that queries an external calendar API. During testing, you encounter three error conditions: (1) the tool is called with a malformed request missing the required user_email parameter, (2) the calendar API returns a 404 because the specified user doesn’t exist in the calendar system, and (3) the calendar API returns a 503 because the service is temporarily unavailable. How should each error be reported according to MCP’s error handling design?
Report all three as tool results with isError: true.
Report errors 1 and 2 as JSON-RPC protocol errors; report error 3 as a tool result with isError: true.
Report error 1 as a JSON-RPC protocol error; report errors 2 and 3 as tool results with isError: true.