You built the pieces of a tool call in Give your model tools. Here they are in thirty seconds, with the lesson to revisit if one feels shaky.
Describe it. Claude sees a tool's name, description and input_schema, never your code, and the description does most of the work. Revisit Describing a tool and Descriptions Claude follows.
Run it. A reply with stop_reason: "tool_use" holds tool_use blocks. You push Claude's whole reply back unchanged, then one user message with a tool_result per call, matched by tool_use_id. Revisit One round trip.
Fail politely. A failed call still gets a result, marked is_error: true, with a message that says what to try next. Revisit Many calls, some fail.