Skip to main content
Glama

number_add

Calculate the sum of two numbers using this tool. Input two numeric values to return the result of their addition quickly and accurately.

Instructions

简单的求和工具,当想要计算两个数字相加后的结果时调用

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes第一个数字
bYes第二个数字

Implementation Reference

  • Handler function that takes two numbers a and b, adds them, and returns the result as a text content block.
    async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }], })
  • Zod input schema defining parameters a and b as numbers with descriptions.
    { a: z.number().describe("第一个数字"), b: z.number().describe("第二个数字"), },
  • src/index.ts:20-30 (registration)
    Registration of the 'number_add' tool using server.tool(), including name, description, input schema, and handler function.
    server.tool( "number_add", "简单的求和工具,当想要计算两个数字相加后的结果时调用", { a: z.number().describe("第一个数字"), b: z.number().describe("第二个数字"), }, async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }], }) );

Other Tools

Related Tools

  • @riteshbangal/BuildMcpServer
  • @bahfahh/mcptest
  • @GonTwVn/GonMCPtool
  • @parameshwaran1/mcpserverexample
  • @kelseyee/mcp_calculator
  • @joeguo911/mcp-demo

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/liaotaodcx8/toolkittest'

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