Skip to main content
Glama

add

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

Instructions

Add two numbers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • Handler function that adds two numbers a and b, returns the result as text.
    async ({ a, b }) => { return { content: [{ type: "text", text: String(a + b) }], }; }
  • Input schema validating two numbers a and b.
    { a: z.number().describe("First number"), b: z.number().describe("Second number"), },
  • src/index.ts:39-51 (registration)
    Registers the 'Add' tool on the MCP server with name, description, input schema, and handler function.
    server.tool( "Add", "Add two numbers", { a: z.number().describe("First number"), b: z.number().describe("Second number"), }, async ({ a, b }) => { return { content: [{ type: "text", text: String(a + b) }], }; } );

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/haojiasheng/add-number-mcp'

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