Skip to main content
Glama

add

Perform addition of two numbers using the MCP Document Server to streamline calculations within markdown document workflows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • Handler function that adds two numbers 'a' and 'b' and returns the result as a text content block.
    async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }] })
  • Input schema using Zod defining two required number parameters 'a' and 'b' for the 'add' tool.
    { a: z.number(), b: z.number() },
  • tools/index.js:7-12 (registration)
    Registration of the 'add' tool using mcpServer.tool(), including schema and inline handler.
    mcpServer.tool("add", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }] }) );
  • server.js:21-21 (registration)
    Invocation of registerTools function which registers the 'add' tool among others.
    registerTools(mcpServer);
  • server.js:6-6 (registration)
    Import of the registerTools function from tools/index.js.
    import { registerTools } from './tools/index.js';

Other Tools

Related Tools

  • @YuheiNakasaka/arithmetic-mcp-server
  • @wrtnlabs/calculator-mcp
  • @githubpradeep/calc-mcp72
  • @zhangzhefang-github/mcp-add-server
  • @FuzzyCZX/MCP
  • @haojiasheng/add-number-mcp

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/motiondesignlv/MCP_server'

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