Skip to main content
Glama
tech-sushant

Calculator MCP Server

by tech-sushant

power

Calculate exponentiation by raising a base number to a specified exponent power. Use this tool to perform mathematical power operations within the Calculator MCP Server.

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.
    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}`,
          },
        ],
      };
    }
  • src/index.ts:92-109 (registration)
    Registration of the 'power' tool in listTools handler, 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"],
      },
    },
  • Input schema for the '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"],
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the mathematical operation but doesn't mention error handling (e.g., large exponents, decimal exponents), performance characteristics, or any limitations. For a mathematical tool with zero annotation coverage, this is a significant gap in behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function with zero wasted words. It's appropriately sized for this simple mathematical operation and front-loads the essential information without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple mathematical operation with 100% schema coverage and no output schema, the description is adequate but has clear gaps. It explains what the tool does but doesn't provide usage guidance relative to siblings, behavioral context, or output expectations. The description meets minimum requirements but could be more helpful for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters clearly documented in the schema. The description adds minimal value beyond the schema by specifying which parameter is the base and which is the exponent, but doesn't provide additional context about valid ranges, special cases, or mathematical properties beyond what's already in the structured schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the mathematical operation (raise to power) and identifies the two input numbers (first number as base, second as exponent). It distinguishes from siblings like add, subtract, multiply, and divide by specifying exponentiation, but doesn't explicitly differentiate from sqrt which is a related but distinct operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like sqrt (which calculates square roots) or other mathematical operations. It simply states what the tool does without context about appropriate use cases or comparisons to sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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