add
Calculate the sum of two integers to perform basic arithmetic operations in MCP server applications.
Instructions
Add two numbers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- src/mcpserver/deployment.py:8-12 (handler)The 'add' tool is implemented and registered here. The handler function adds two integer arguments and returns their sum. The @mcp.tool() decorator registers it with the MCP server.# Add an addition tool @mcp.tool() def add(a: int, b: int) -> int: """Add two numbers""" return a + b