Tools: what the host sees

The model never sees your Python. The host asks the server for its tools and gets a JSON Schema for each one.

The host asks

tools/listjson
{  "jsonrpc": "2.0",  "id": 1,  "method": "tools/list"}

The server answers

tools/list → resultjson
{  "tools": [    {      "name": "add",      "title": "Add numbers",      "description": "Add two numbers.",      "inputSchema": {        "type": "object",        "properties": {          "a": { "type": "integer" },          "b": { "type": "integer" }        },        "required": ["a", "b"]      },      "outputSchema": {        "type": "object",        "properties": { "result": { "type": "integer" } },        "required": ["result"]      },      "annotations": { "readOnlyHint": true }    }  ]}

 

 

 

← the function name

← title=

← the docstring

← the type hints, as JSON Schema

 

 

 

 

 

← arguments without a default

 

← the return type, wrapped in result

 

 

 

 

← annotations=

 

 

 

The host gives the model only the highlighted fields: name, description and inputSchema. That is all the model knows about the tool, so the description is effectively a prompt. title, outputSchema and annotations are mainly for the host.

7 / 28