Skip to main content
Glama

power

Calculate exponential values by raising any base number to a specified power. Enter the base and exponent to get the mathematical result of base^exponent.

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

Implementation Reference

  • The main handler function for the 'power' tool. It is registered via the @mcp.tool() decorator and implements the logic to raise the base to the given exponent using math.pow. Includes type hints and docstring defining input/output schema.
    @mcp.tool() 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)

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