Skip to main content
Glama
xiaoyuchenhot

MCP Multi-Tool Server

power

Calculate exponential values by raising a base number to a specified power using mathematical exponentiation.

Instructions

Raise a number to a power.

Args:
    base: The base number
    exponent: The exponent (power to raise the base to)

Returns:
    The result of base raised to the power of exponent (base^exponent)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseYes
exponentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'power' tool. It takes base and exponent as floats and returns base raised to the power of exponent using math.pow.
    def power(base: float, exponent: float) -> float:
        """
        Raise a number to a power.
        
        Args:
            base: The base number
            exponent: The exponent (power to raise the base to)
        
        Returns:
            The result of base raised to the power of exponent (base^exponent)
        """
        return math.pow(base, exponent)
  • server.py:91-91 (registration)
    The @mcp.tool() decorator registers the power function as an MCP tool with the name 'power' derived from the function name.
    @mcp.tool()
  • The docstring provides the description, input parameters (base, exponent), and return value description, which FastMCP uses to generate the tool's JSON schema.
    """
    Raise a number to a power.
    
    Args:
        base: The base number
        exponent: The exponent (power to raise the base to)
    
    Returns:
        The result of base raised to the power of exponent (base^exponent)
    """
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It describes the basic operation and return value, but lacks details on error handling (e.g., for invalid inputs like non-numeric values), performance, or other behavioral traits. It adds some context but is minimal.

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 appropriately sized and front-loaded with the purpose, followed by structured sections for arguments and returns. Every sentence earns its place by clearly explaining the tool's function and parameters without unnecessary details.

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

Completeness4/5

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

Given the tool's low complexity and the presence of an output schema (which handles return values), the description is mostly complete. It covers purpose and parameters well, but could benefit from more behavioral context (e.g., error cases) since no annotations are provided.

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?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explicitly defines 'base' as 'The base number' and 'exponent' as 'The exponent (power to raise the base to)', providing clear semantics that the schema lacks, fully compensating for the coverage gap.

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 states the specific mathematical operation ('Raise a number to a power') with clear verb+resource, and it distinguishes this from sibling tools like 'multiply', 'square_root', or 'factorial' by specifying exponentiation rather than other arithmetic operations.

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 indicates this tool is for exponentiation, which implies usage for mathematical calculations involving powers. However, it does not explicitly state when to use this versus alternatives like 'square_root' (for specific exponents) or other siblings, leaving some context for the agent to infer.

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/xiaoyuchenhot/MCP-example'

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