[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3
SEQ. 4
SEQ. 5
SEQ. 6
Defining & Executing Tools
Passing Tools to Models
To let an LLM use a tool, you define its signature using a JSON Schema. The LLM doesn't execute the code-it asks you to execute it.
{
"name": "get_weather",
"description": "Get the current weather in a given location.",
"input_schema": {
"type": "object",
"properties": {
"location": { "type": "string", "description": "City name" }
},
"required": ["location"]
}
}
The Handshake
- Send prompt + tools array.
- Model responds with
tool_useintent (e.g., location="Tokyo"). - Your code executes
get_weather("Tokyo"). - You send the result back as a
tool_resultmessage.
SYNAPSE VERIFICATION
QUERY 1 // 1
Who actually executes the code when an agent calls a tool?
The LLM provider's servers
Your local application/orchestrator code
The user's browser
A third-party executing service