Add
addSums two numbers with v2 Zod validation and returns structured output, helping developers test MCP tool input validation and structured responses.
Instructions
Adds two numbers. Shows v2 Zod validation and structured output.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"a": "<a>",
"b": "<b>"
},
"name": "add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | First number | |
| b | Yes | Second number |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sum | Yes |