multiply
Takes two numeric inputs and returns their product. Solves multiplication calculations.
Instructions
Multiply two numbers
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": "multiply"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- calculator_server/server.py:191-194 (handler)The multiply tool handler function, decorated with @mcp.tool(). Takes two float arguments a and b, returns their product.
@mcp.tool() def multiply(a: float, b: float) -> float: """Multiply two numbers""" return a * b - calculator_server/server.py:191-194 (registration)The multiply tool is registered via the @mcp.tool() decorator on line 191.
@mcp.tool() def multiply(a: float, b: float) -> float: """Multiply two numbers""" return a * b