subtract
Perform subtraction of two integer values on the Example MCP Server. Enter numerical inputs 'A' and 'B' to calculate the difference.
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 for the 'subtract' tool, which subtracts two integers and returns the result.def subtract(a: int, b: int) -> int: """Subtract two numbers""" return a - b
- main.py:14-14 (registration)Registration of the 'subtract' tool using the @mcp.tool decorator.@mcp.tool