Skip to main content
Glama

add

Perform addition of two numbers using specified inputs. Simplify arithmetic calculations within the Hello-MCP server for seamless integration and processing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • src/mcpServer.js:17-22 (registration)
    Registration of the MCP 'add' tool. Includes inline Zod schema for numeric inputs 'a' and 'b', and an async handler that returns the sum as text content.
    server.tool("add", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }] }) );
  • The handler function for the 'add' tool, which adds the inputs a and b and returns the result as a text content block.
    async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }] })
  • Zod schema defining the input parameters for the 'add' tool: two numbers a and b.
    { a: z.number(), b: z.number() },

Other Tools

Related Tools

  • @wrtnlabs/calculator-mcp
  • @YuheiNakasaka/arithmetic-mcp-server
  • @zhangzhefang-github/mcp-add-server
  • @MillCityAI/mcp-hello-world
  • @githubpradeep/calc-mcp72
  • @kylekanouse/Test-MCP---DEMO-MCP-Dev-1

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/hongsw/hello-mcp'

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