add
Calculate the sum of two integer values to perform basic arithmetic operations and obtain accurate mathematical results.
Instructions
Adds two numbers a and b and returns the result!
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- src/mcpserver/deployment.py:6-10 (handler)The handler function that implements the 'add' tool logic, adding two integers and returning the sum.def add(a: int, b: int) -> int: """ Adds two numbers a and b and returns the result! """ return a + b
- src/mcpserver/deployment.py:5-5 (registration)The decorator that registers the 'add' function as an MCP tool.@mcp.tool()
- src/mcpserver/deployment.py:6-6 (schema)Type annotations defining the input schema (two integers) and output (integer). The docstring provides additional description.def add(a: int, b: int) -> int: