Tool Use and MCP
Drill 20 practice questions focused entirely on Tool Use and MCP for the Anthropic CCAO-F exam. Tap an answer for instant feedback and a full explanation — no sign-up, always free.
Your engineering team wants to connect Claude to your company's internal PostgreSQL database and a Google Drive folder using the Model Context Protocol (MCP). A developer asks you to clarify the architecture: which component actually exposes the database and Drive as accessible resources, and which component the Claude-powered application uses to consume them?
Your engineering team currently maintains separate, custom integration code for each tool and data source they want Claude to access (a Postgres database, a GitHub repo, and an internal ticketing system). A colleague suggests adopting the Model Context Protocol (MCP) to reduce this maintenance burden. At a conceptual level, what does MCP primarily provide in this situation?
A development team wants Claude to read from their company's internal Postgres database and query their ticketing system. They plan to build reusable connectors so that multiple AI applications inside the company can access these same data sources without each app re-implementing the integration. Which approach aligns with the purpose of the Model Context Protocol (MCP)?
Your company has built five separate custom integrations connecting Claude to an internal wiki, a ticketing system, a database, a calendar, and a file store. Each integration uses its own bespoke connection code, and every time you add a new AI application, developers must rewrite these connectors from scratch. A colleague suggests adopting the Model Context Protocol (MCP). What is the primary benefit MCP provides in this situation?
You are building a travel assistant with Claude. For a single user request, Claude needs to look up the weather for three different cities before making a recommendation. The three weather lookups are completely independent of one another and use the same tool with different inputs. How should you handle this to minimize total latency?
You are building a customer-support assistant that has access to a `lookup_order` tool. Many incoming messages are simple greetings or general questions ('What are your hours?') that do not need any tool, while others clearly require an order lookup. You want Claude to answer directly when no tool is needed but call the tool when it is appropriate. Which `tool_choice` setting best fits this requirement?
You have configured a customer-support assistant with three tools (order lookup, refund processor, and shipping tracker). A user asks a general question: 'What are your store's holiday return policies?' You want Claude to answer directly from its system-prompt knowledge without invoking any tool for this particular request. Which approach correctly prevents tool use for this call?
You are building a customer-support assistant that must always log a ticket by calling the `create_ticket` tool at the end of every conversation, regardless of the user's phrasing. During testing, Claude sometimes replies with a plain text summary instead of invoking the tool. Which configuration best guarantees that Claude calls `create_ticket` on the relevant request?
A developer is adding a currency-conversion capability to a Claude-powered assistant. They want Claude to be able to invoke this capability during the conversation. When defining the tool in the API request, which three components must the developer provide for the tool definition to be valid and usable by Claude?
You've defined a tool called get_weather for a travel assistant. Claude frequently calls it with vague or incorrect location values (e.g., 'there' or a hotel name instead of a city). The input schema already requires a 'location' string. What is the most effective first change to reduce these errors?
You are building a scheduling assistant with a tool called book_meeting. During testing, Claude frequently calls the tool with the date in an inconsistent format (sometimes 'next Tuesday', sometimes '2024-06-11'), causing the backend to reject requests. The tool's input schema already specifies a 'date' field as a string. What is the most effective change to reduce these malformed calls?
You are defining a `get_account_balance` tool for a banking assistant. During testing, Claude frequently calls the tool even when users ask general questions like "What are your business hours?" that have nothing to do with balances. The tool's name and input schema are correct. What is the most effective change to reduce these inappropriate calls?
You built an integration where Claude can call a get_stock_price tool. During a conversation, Claude requests the tool, but your backend API returns a 503 error because the pricing service is temporarily down. You want Claude to handle this gracefully—ideally by informing the user or retrying later—rather than fabricating a price. How should you communicate this failure back to Claude in the request/response loop?
You are defining a `book_flight` tool for a travel assistant. The tool must always receive a departure airport, a destination airport, and a date, but the number of passengers should default to 1 if not provided. Which part of the tool definition is responsible for telling Claude that `departure`, `destination`, and `date` must always be supplied?
A developer is defining a currency-conversion tool for Claude. They have written a detailed description and a complete input JSON schema, but they are unsure what to put in the tool's 'name' field and how Claude uses it. What is the primary purpose of the 'name' field in a tool definition?
Your application defines a get_weather tool. Claude responds with a tool_use block requesting the tool with a specific tool_use_id. Your code runs the function and gets the result '72°F, sunny'. To continue the conversation loop correctly, how should you send this result back to Claude?
Your application defined three independent tools and, in a single turn, Claude returned a stop_reason of 'tool_use' with three separate tool_use blocks (each with a unique tool_use_id). Your backend executes all three in parallel and gets all results back. How should you structure the next message you send back to Claude?
You are building a weather assistant. Claude calls your get_forecast tool, but the underlying weather API returns successfully with an empty result set because the requested city was not found in its database. The API itself did not throw an error — it simply returned no matching data. How should you handle this in the tool_result you send back to Claude?
Your customer-support agent calls a `check_order_status` tool. The backend times out and returns no data. You want Claude to acknowledge the failure to the user and possibly suggest a retry, rather than fabricating an order status. When you send the tool result back in the next user-role message, what is the correct way to communicate this outcome to Claude?
Your application defines a `get_weather` tool. Claude requests it, and your backend function returns a Python dictionary: `{'temp_c': 18, 'conditions': 'cloudy'}`. When you send this back to Claude in the follow-up API request, how should the tool's output be placed in the tool_result content block?
More CCAO-F practice
Keep going with the other Claude Certified Associate (Foundations) domains, or take a full timed mock exam.
← Back to CCAO-F overview