add
Add two integers together to calculate their sum. Use this tool to perform basic addition operations within the MCP Server Example.
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:5-5 (registration)Registers the 'add' function as an MCP tool using the FastMCP decorator.@mcp.tool()
- src/mcpserver/deployment.py:6-10 (handler)The handler function that implements the 'add' tool logic by adding two integers and returning the result.def add(a: int, b: int) -> int: """ Adds two numbers a and b and returns the result! """ return a + b