Skip to main content
Glama
SanLangLOVE

Simple Calculator MCP

by SanLangLOVE

subtract

Calculate the difference between two numbers by subtracting one from another using this mathematical operation tool.

Instructions

计算两个数字的差

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes被减数
bYes减数

Implementation Reference

  • Handler for the 'subtract' tool: extracts arguments a and b, computes their difference, and returns a formatted text response.
    case "subtract": { const { a, b } = args as { a: number; b: number }; const result = a - b; return { content: [ { type: "text", text: `${a} - ${b} = ${result}`, }, ], }; }
  • Schema definition for the 'subtract' tool, including name, description, and input schema requiring two number parameters: a (minuend) and b (subtrahend).
    { name: "subtract", description: "计算两个数字的差", inputSchema: { type: "object", properties: { a: { type: "number", description: "被减数", }, b: { type: "number", description: "减数", }, }, required: ["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/SanLangLOVE/mcp-calculator'

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