add
Compute the sum of two numbers. Provide two numeric inputs to perform addition.
Instructions
Add two numbers
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- calculator_server/server.py:182-184 (handler)The 'add' tool handler function that adds two numbers. Decorated with @mcp.tool() and returns the sum of a and b.
def add(a: float, b: float) -> float: """Add two numbers""" return a + b - calculator_server/server.py:181-181 (registration)The @mcp.tool() decorator that registers the add function as an MCP tool.
@mcp.tool()