add
Add two integer numbers together using this arithmetic tool from MCPServerDemo. Perform basic addition calculations with specified values.
Instructions
add two numbers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- main.py:13-18 (handler)The 'add' tool is defined here using the @method decorator. It performs simple integer addition and returns a JSON-RPC Success result.
@method def add(a: int, b: int) -> Result: logger.info(f"Received add request with params: a={a}, b={b}") result = a + b logger.info(f"Add operation result: {result}") return Success(result)