Skip to main content
Glama
sakthigcp

MCP Server Example

by sakthigcp

add

Add two integers together to calculate their sum. Use this tool to perform basic addition operations within the MCP Server Example.

Instructions

Adds two numbers a and b and returns the result!

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • Registers the 'add' function as an MCP tool using the FastMCP decorator.
    @mcp.tool()
  • The handler function that implements the 'add' tool logic by adding two integers and returning the result.
    def add(a: int, b: int) -> int: """ Adds two numbers a and b and returns the result! """ return a + b
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/sakthigcp/mcpserverexample'

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