sum_numbers
Calculate the sum of a list of integers. This tool from MCP Deployment adds multiple numbers together to provide a total.
Instructions
Returns the sum of a list of integers provided as input. Args: numbers (list[int]): A list of integers to be summed.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| numbers | Yes |
Implementation Reference
- src/mcpserver/deployment.py:8-8 (registration)Registers the sum_numbers tool with the MCP server using the @mcp.tool decorator specifying the name.@mcp.tool(name="sum_numbers")
- src/mcpserver/deployment.py:9-15 (handler)The handler function for sum_numbers that takes a list of integers and returns their sum using Python's built-in sum().def sum_numbers(numbers: list[int]) -> int: """ Returns the sum of a list of integers provided as input. Args: numbers (list[int]): A list of integers to be summed. """ return sum(numbers)