subtract
Calculate the difference between two numbers by subtracting one integer from another. Use this tool to perform basic arithmetic subtraction operations.
Instructions
Subtract two numbers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- main.py:15-17 (handler)The handler function that implements the subtract tool logic by subtracting two integers.def subtract(a: int, b: int) -> int: """Subtract two numbers""" return a - b
- main.py:14-14 (registration)Registers the subtract tool with the FastMCP instance using the @mcp.tool decorator.@mcp.tool
- main.py:15-15 (schema)Type annotations defining the input schema (two ints) and output (int) for the subtract tool.def subtract(a: int, b: int) -> int: