multiply
Multiply two numeric values to compute their product.
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
- The 'multiply' tool handler function, decorated with @mcp.tool(), that multiplies two float numbers.
@mcp.tool() def multiply(a: float, b: float) -> float: """Multiply two numbers.""" return a * b - Type annotations (a: float, b: float) -> float serve as the input/output schema for the multiply tool.
def multiply(a: float, b: float) -> float: - src/mcp_research_collective/mcp_server.py:91-91 (registration)The @mcp.tool() decorator registers this function as an MCP tool on the FastMCP instance.
@mcp.tool()