subtract
Calculate the difference by subtracting b from a, returning the result.
Instructions
Subtract b from a.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- The subtract tool handler: decorated with @mcp.tool(), takes two floats a and b, returns a - b.
def subtract(a: float, b: float) -> float: """Subtract b from a.""" return a - b - src/mcp_research_collective/mcp_server.py:85-85 (registration)The @mcp.tool() decorator on line 85 registers subtract as an MCP tool on the FastMCP server instance.
@mcp.tool()