Skip to main content
Glama
YuheiNakasaka

Arithmetic MCP Server

add

Add two numbers together to calculate their sum. This arithmetic tool performs basic addition operations for mathematical calculations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • Handler function for the 'add' tool that computes a + b and returns the result as text content.
    async ({ a, b }) => ({ content: [{ type: "text", text: `${a} と ${b} の足し算の結果: ${a + b}` }] })
  • Input schema for the 'add' tool: two numbers a and b using Zod.
    { a: z.number(), b: z.number() },
  • src/index.ts:13-22 (registration)
    Registration of the 'add' tool on the McpServer instance.
    server.tool( "add", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: `${a} と ${b} の足し算の結果: ${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/YuheiNakasaka/arithmetic-mcp-server'

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