add
Add two integers together using this simple arithmetic tool from the MCP Server Deployment Demo. Perform basic addition calculations for development testing and learning purposes.
Instructions
Adds two integers.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes |
Implementation Reference
- src/mcpserver/deployment.py:6-10 (handler)The handler function for the 'add' tool, which adds two integer inputs and returns their sum.def add(x: int, y: int) -> int: """ Adds two integers. """ return x + y
- src/mcpserver/deployment.py:5-5 (registration)The @mcp.tool() decorator registers the 'add' function as a tool on the FastMCP server instance.@mcp.tool()