sum
Add two integers together to calculate their total. This tool performs basic arithmetic addition for numerical values.
Instructions
Suma dos números.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- server.py:13-16 (registration)The sum tool is registered using the @mcp.tool() decorator, which exposes the function as an MCP tool.
@mcp.tool() def sum(a: int, b: int) -> int: """Suma dos números.""" return a + b - server.py:14-16 (handler)The sum handler function that takes two integer parameters (a, b) and returns their sum. The function signature also serves as the schema definition.
def sum(a: int, b: int) -> int: """Suma dos números.""" return a + b