Skip to main content
Glama
SanLangLOVE

Simple Calculator MCP

by SanLangLOVE

power

Calculate exponential values by raising a base number to a specified power. Use this mathematical tool to compute exponentiation operations for various applications.

Instructions

计算一个数字的幂

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseYes底数
exponentYes指数

Implementation Reference

  • Handler function for the 'power' tool. Extracts base and exponent from arguments, computes Math.pow(base, exponent), and returns the result as formatted text content.
    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 the 'power' tool, defining 'base' and 'exponent' as required number properties.
    inputSchema: { type: "object", properties: { base: { type: "number", description: "底数", }, exponent: { type: "number", description: "指数", }, }, required: ["base", "exponent"], },
  • src/index.ts:90-107 (registration)
    Registration of the 'power' tool in the tools array, including name, description, and input schema. This array is returned by the ListToolsRequest handler.
    { name: "power", description: "计算一个数字的幂", inputSchema: { type: "object", properties: { base: { type: "number", description: "底数", }, exponent: { type: "number", description: "指数", }, }, required: ["base", "exponent"], }, },
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