Skip to main content
Glama
tech-sushant

Calculator MCP Server

by tech-sushant

power

Calculate exponential values by raising a base number to any exponent power for mathematical operations and scientific calculations.

Instructions

Raise first number to the power of second number

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseYesBase number
exponentYesExponent

Implementation Reference

  • Handler for the 'power' tool: extracts base and exponent from arguments, computes Math.pow(base, exponent), and returns formatted result text.
    case "power": { const { base, exponent } = args as { base: number; exponent: number }; const result = Math.pow(base, exponent); return { content: [ { type: "text", text: `${base}^${exponent} = ${result}`, }, ], }; }
  • Input schema for 'power' tool defining base and exponent as required number properties.
    inputSchema: { type: "object", properties: { base: { type: "number", description: "Base number", }, exponent: { type: "number", description: "Exponent", }, }, required: ["base", "exponent"], },
  • src/index.ts:92-109 (registration)
    Registration of 'power' tool in ListTools response, including name, description, and input schema.
    { name: "power", description: "Raise first number to the power of second number", inputSchema: { type: "object", properties: { base: { type: "number", description: "Base number", }, exponent: { type: "number", description: "Exponent", }, }, required: ["base", "exponent"], }, },

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