Skip to main content
Glama
tech-sushant

Calculator MCP Server

by tech-sushant

multiply

Calculate the product of two numbers by multiplying them together using this arithmetic tool.

Instructions

Multiply two numbers together

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesFirst number to multiply
bYesSecond number to multiply

Implementation Reference

  • Handler for the 'multiply' tool: destructures arguments 'a' and 'b', computes their product, and returns a formatted text response.
    case "multiply": { const { a, b } = args as { a: number; b: number }; const result = a * b; return { content: [ { type: "text", text: `${a} × ${b} = ${result}`, }, ], }; }
  • src/index.ts:56-73 (registration)
    Registration of the 'multiply' tool in the ListTools response, including name, description, and input schema defining parameters 'a' and 'b' as required numbers.
    { name: "multiply", description: "Multiply two numbers together", inputSchema: { type: "object", properties: { a: { type: "number", description: "First number to multiply", }, b: { type: "number", description: "Second number to multiply", }, }, required: ["a", "b"], }, },
  • Input schema for the 'multiply' tool, specifying an object with required number properties 'a' and 'b'.
    inputSchema: { type: "object", properties: { a: { type: "number", description: "First number to multiply", }, b: { type: "number", description: "Second number to multiply", }, }, 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/tech-sushant/calculator-mcp'

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