Skip to main content
Glama

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

Implementation Reference

  • Registers the sum_numbers tool with the MCP server using the @mcp.tool decorator specifying the name.
    @mcp.tool(name="sum_numbers")
  • 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)
Install Server

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