Skip to content
AgenticAIWiki
  1. Learn
  2. Part 7. Tool design and MCP
  3. Chapter 34

Designing good tools

6 lessons · 30 min

Two versions of the same tool

Full screen
questionCustomer"Where is order A-10234?"Claudereads definitions onlyVersion AlookupVersion Bget_order_statusjson// Version A{ "name": "lookup", "description": "Gets data.", "input_schema": { "type": "object", "properties": { "q": { "type": "string" } } } }// Version B{ "name": "get_order_status", "description": "Shipping status of one order by its id. Use when the customer asks where an order is. Not for refunds. Returns status and delivery date.", "input_schema": { "type": "object", "properties": { "order_id": { "type": "string", "description": "e.g. A-10234" } }, "required": ["order_id"] } }

Swipe to change step

Step 1 of 7. Here are two versions of the same order lookup tool. Claude never sees the code behind either one. It only sees the definition: a name, a description and an input schema. Customer ("Where is order A-10234?"). Claude (reads definitions only). Version A (lookup), highlighted. Version B (get_order_status), highlighted. arrow from Customer to Claude, labelled question.

In this chapter

  1. 34.1Names and descriptions that don't confuse5 min read
  2. 34.2Input schemas and required fields5 min read
  3. 34.3Structured errors: isError, errorCategory, isRetryable6 min read
  4. 34.4How many tools is too many4 min read
  5. 34.5Limiting what a tool can touch4 min read
  6. 34.6Feeding errors and stack traces back to the model6 min read

Chapter check

Already know this? Score 80% or more and you can skip ahead. Each attempt draws 4 questions from 12.

Loading check…