multiply
Calculate the product of two numbers by multiplying them together. Use this tool to perform multiplication operations with specified numerical inputs.
Instructions
Multiply two numbers together.
Args:
a: The first number
b: The second number
Returns:
The product of a and b
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
- server.py:56-68 (handler)The 'multiply' tool handler function that multiplies two float inputs. Registered via @mcp.tool() decorator, with schema inferred from type annotations and docstring.
@mcp.tool() def multiply(a: float, b: float) -> float: """ Multiply two numbers together. Args: a: The first number b: The second number Returns: The product of a and b """ return a * b