Skip to main content
Glama
YuheiNakasaka

Arithmetic MCP Server

subtract

Perform subtraction of two numbers using the Arithmetic MCP Server's tool. Input two numerical values to calculate and retrieve the result efficiently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • src/index.ts:25-34 (registration)
    Registration of the 'subtract' tool, including schema and inline handler function.
    server.tool( "subtract", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: `${a} と ${b} の引き算の結果: ${a - b}` }] }) );
  • Input schema for 'subtract' tool: two numbers a and b using Zod validation.
    { a: z.number(), b: z.number() },
  • Handler function for 'subtract' tool: computes a - b and returns formatted text content.
    async ({ a, b }) => ({ content: [{ type: "text", text: `${a} と ${b} の引き算の結果: ${a - b}` }] })

Other Tools

Related 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