A tool is a function a server exposes that the model can choose to call. Each tool has a unique name, a description, and an inputSchema, the JSON Schema that describes its arguments.
Discovery and calling are two JSON-RPC methods. The client sends tools/list and hands the returned definitions to the model. When the model picks one, the client sends tools/call with the name and arguments. The server returns content blocks such as text, images, or embedded resources.
// client -> server
{"jsonrpc": "2.0", "id": 2, "method": "tools/call",
"params": {"name": "get_weather", "arguments": {"city": "Berlin"}}}
// server -> client
{"jsonrpc": "2.0", "id": 2,
"result": {"content": [{"type": "text", "text": "18C, cloudy"}], "isError": false}}
Two details matter. Tools are model-controlled, so hosts should ask the user before running one. And if the server declares the listChanged capability, it can send notifications/tools/list_changed, and the client must re-list to stay current.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓