Skip to main content
Glama

power

Calculate mathematical power operations by raising any base number to a specified exponent for quick exponentiation results.

Instructions

Raise a number to a power.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseYes
exponentYes

Implementation Reference

  • server.py:95-98 (handler)
    The handler function for the 'power' tool, registered via @mcp.tool() decorator. It raises the base to the power of the exponent using Python's ** operator.
    @mcp.tool() def power(base: float, exponent: float) -> float: """Raise a number to a power.""" return 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/vipankumar87/MCP-Example'

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