Skip to main content
Glama

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
NameRequiredDescriptionDefault
numbersYes

Implementation Reference

  • Registration of the sum_numbers tool using the @mcp.tool decorator on the FastMCP instance.
    @mcp.tool(name="sum_numbers")
  • 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)

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mandapati-SuryanarayanaRaju/mcp-deployment'

If you have feedback or need assistance with the MCP directory API, please join our Discord server