5/17
Part 2 of 7 · ToolsLearn and do

A tool is a name, a description and a schema, and the harness checks every call against it

What the model reads before it calls a tool

A tool reaches the model as a definition: a name, a description in plain words, and an input schema, which Anthropic's docs describe as a JSON Schema object defining the expected parameters for the tool. Here's the refund tool:

REFUND_TOOL = {
    "name": "issue_refund",
    "description": "Refund an order. Call it only after look_up_order shows the order is unused and inside "
                   "its return window. amount is the refund in dollars, at most the order total.",
    "input_schema": {
        "type": "object",
        "properties": {"order_id": {"type": "string"}, "amount": {"type": "number"}},
        "required": ["order_id", "amount"],
    },
}
Predict

Which part of a tool definition matters most to how well the model uses the tool?

Pick an answer above to see the rest