add
Perform basic addition of two numbers. Input two numeric values, and the tool calculates their sum for quick computation tasks.
Instructions
Add two numbers together.
Args:
a: First number
b: Second number
Returns:
The sum of a and b
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- src/mcpserver/server_1.py:5-17 (handler)The 'add' tool handler, registered via @mcp.tool() decorator. It adds two integers i and j and returns their sum. Includes type hints and docstring serving as schema.@mcp.tool() def add(i:int , j:int) -> int: """ Adds two integers and returns the result. Args: i (int): The first integer to add. j (int): The second integer to add. Returns: int: The sum of i and j. """ return i+ j