Skip to main content
Glama
Amankhan1009

calculator-mcp-server

by Amankhan1009

power

Read-onlyIdempotent

Raise a base number to a given exponent and get the result. Handles invalid operations like overflow or complex results with clear errors.

Instructions

Raise a number to a power.

Args: base: The base number. exponent: The power to raise the base to.

Returns: base raised to the power of exponent.

Raises: InvalidPowerOperationError: If the result would be complex, or if the computation overflows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseYes
exponentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false. The description adds valuable behavioral context by documenting the InvalidPowerOperationError for complex results or overflow, which is not present in annotations. This exceeds the baseline while remaining concise.

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 minimal and well-structured with Args, Returns, and Raises sections. Every line provides essential information without redundancy, making it easy to scan and interpret.

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

Completeness5/5

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

For a simple arithmetic tool, the description covers the operation, both parameters, the return value, and the primary error case. Annotations cover safety/permanence. No gaps remain, especially given the straightforward domain and sibling context.

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

Parameters5/5

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

Schema coverage is 0%, but the description explicitly explains each parameter: 'base: The base number' and 'exponent: The power to raise the base to.' It also clarifies the return value and error conditions, fully compensating for the schema's lack of descriptions.

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

Purpose5/5

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

The description opens with 'Raise a number to a power,' which is a specific verb+resource statement that clearly distinguishes it from arithmetic siblings like add, multiply, and square_root. The purpose is immediately unambiguous.

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

Usage Guidelines4/5

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

The description clearly implies when to use this tool (for exponentiation) by defining exactly what it does. However, it does not explicitly reference alternative tools or state exclusions, such as 'use square_root for inverse operations,' so it misses the top score for direct guidance.

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

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