addition
Adds two numbers together to calculate their sum, demonstrating basic arithmetic operations within an educational security testing environment.
Instructions
Sum tool
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>"
},
"name": "addition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes |
Implementation Reference
- server.py:9-9 (registration)Registration of the 'addition' tool using the @mcp.tool() decorator on the addition function.
@mcp.tool() - server.py:10-12 (handler)The handler function for the 'addition' tool, which takes a single argument 'a' (a string expression) and evaluates it using Python's built-in eval() function to compute the result.
def addition(a): """Sum tool""" return eval(a)