subtract
Calculate the difference between two numbers by subtracting the second from the first. This mathematical tool performs subtraction operations to find numerical results.
Instructions
Subtract the second number from the first number.
Args:
a: The first number (minuend)
b: The second number (subtrahend)
Returns:
The difference of a and b (a - b)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- server.py:41-53 (handler)The subtract tool handler function. It subtracts the second argument from the first and is registered as an MCP tool via the @mcp.tool() decorator. Input schema defined by type hints (a: float, b: float) and output float.@mcp.tool() def subtract(a: float, b: float) -> float: """ Subtract the second number from the first number. Args: a: The first number (minuend) b: The second number (subtrahend) Returns: The difference of a and b (a - b) """ return a - b