Skip to main content
Glama
NitinUdasin

MCPServerDemo

by NitinUdasin

add

Add two integer numbers together using this arithmetic tool from MCPServerDemo. Perform basic addition calculations with specified values.

Instructions

add two numbers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • main.py:13-18 (handler)
    The 'add' tool is defined here using the @method decorator. It performs simple integer addition and returns a JSON-RPC Success result.
    @method
    def add(a: int, b: int) -> Result:
        logger.info(f"Received add request with params: a={a}, b={b}")
        result = a + b
        logger.info(f"Add operation result: {result}")
        return Success(result)
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/NitinUdasin/MCPServerDemo'

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