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"],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. The description only states what the tool does mathematically but reveals nothing about behavioral traits like error handling (e.g., handling of large exponents, invalid inputs), performance characteristics, or side effects. For a mathematical operation tool with zero annotation coverage, this is a significant gap.

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 in Chinese that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple mathematical function 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 tool with 2 parameters, 100% schema coverage, and no output schema, the description is minimally adequate. It states the core function but lacks context about mathematical constraints, error cases, or result format. Given the simplicity of the operation and good schema documentation, it meets basic requirements but could be more complete.

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?

The schema description coverage is 100%, with both parameters ('base' and 'exponent') clearly documented in the schema. The description adds no additional parameter semantics beyond what the schema already provides. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no parameter information in the description.

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 '计算一个数字的幂' (calculate the power of a number) clearly states the tool's function with a specific verb and resource. It distinguishes from sibling tools like add, subtract, multiply, and divide by focusing on exponentiation rather than basic arithmetic operations. However, it doesn't explicitly differentiate from potential non-sibling power-related tools.

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. While the purpose is clear, there's no mention of when exponentiation is appropriate compared to other mathematical operations or any prerequisites for use. The agent must infer usage from the tool name and description alone.

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/SanLangLOVE/mcp-calculator'

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