power
Calculate exponential values by raising a base number to a specified power for mathematical computations and data analysis.
Instructions
Raise a number to a power.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"base": "<base>",
"exponent": "<exponent>"
},
"name": "power"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | ||
| exponent | Yes |
Implementation Reference
- server.py:95-98 (handler)The handler function for the 'power' MCP tool. It is decorated with @mcp.tool() which registers it, and implements raising the base to the exponent power using the ** operator. The input schema is inferred from type annotations: base (float), exponent (float) returning float.
@mcp.tool() def power(base: float, exponent: float) -> float: """Raise a number to a power.""" return base ** exponent