add_two_numbers
Calculate the sum of two numbers by providing both values as inputs to get the total result.
Instructions
Adds two numbers together.
Args:
a -- the first number
b -- the second number
Returns:
The sum of a and b
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"a": "<a>",
"b": "<b>"
},
"name": "add_two_numbers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- src/mcpserver/deeployment.py:6-16 (handler)The handler function for the 'add_two_numbers' tool, which adds two input numbers and returns their sum.
def add_two_numbers(a, b): """ Adds two numbers together. Args: a -- the first number b -- the second number Returns: The sum of a and b """ return a + b - src/mcpserver/deeployment.py:5-5 (registration)The @mcp.tool() decorator registers the add_two_numbers function as an MCP tool.
@mcp.tool() - src/mcpserver/deeployment.py:7-14 (schema)Docstring providing the schema description for parameters 'a', 'b' and the return value.
""" Adds two numbers together. Args: a -- the first number b -- the second number Returns: The sum of a and b """