subtract
Perform floating-point subtraction by inputting two numbers to calculate the difference. Ideal for precise numerical calculations in mathematical operations.
Instructions
执行浮点数减法运算
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- calculator.py:12-15 (handler)The handler function for the 'subtract' tool, decorated with @mcp.tool() to register it in the MCP server. It takes two float arguments and returns their difference.@mcp.tool() def subtract(a: float, b: float) -> float: """执行浮点数减法运算""" return a - b