multiply
Multiply two integers to calculate their product. This tool performs basic multiplication operations for mathematical calculations.
Instructions
Multiply two numbers together
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
- mcp_server_boilerplate/server.py:17-20 (handler)The handler function for the 'multiply' tool. It takes two integers 'a' and 'b', multiplies them, and returns the result. Registered via the @mcp.tool decorator, which also defines the input schema based on type hints.
@mcp.tool def multiply(a: int, b: int) -> int: """Multiply two numbers together""" return a * b