subtract
Calculate the difference by subtracting the second number from the first.
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
- calculator_server/server.py:186-189 (handler)The subtract tool handler function. Registered with @mcp.tool() decorator, takes two floats (a, b) and returns a - b.
@mcp.tool() def subtract(a: float, b: float) -> float: """Subtract b from a""" return a - b - calculator_server/server.py:186-186 (registration)The @mcp.tool() decorator on line 186 registers the subtract function as an MCP tool.
@mcp.tool()