Skip to main content
Glama

add

Adds two numbers together using the Remote MCP Server's authentication-free calculation service.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • The inline handler function for the 'add' tool that adds two input numbers 'a' and 'b' and returns the result as a text content in the MCP response.
    async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }], })
  • The Zod input schema for the 'add' tool, defining two required number parameters 'a' and 'b'.
    { a: z.number(), b: z.number() },
  • src/index.ts:14-20 (registration)
    The registration of the 'add' tool on the MCP server using server.tool(), including the tool name, input schema, and handler function.
    this.server.tool( "add", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: String(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/feraranas/remote-mcp-server-authless'

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