sum_numbers
Calculate the sum of a list of integers. Input a list of numbers to get their total sum.
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)Registration of the sum_numbers tool using the @mcp.tool decorator on the FastMCP instance.@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 the built-in sum() function. Includes type annotations serving as input/output schema and descriptive docstring.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)