power
Calculate power operations by raising a base number to an exponent. Use this tool to perform exponentiation for mathematical calculations.
Instructions
计算幂运算
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | ||
| exponent | Yes |
Implementation Reference
- calculator.py:33-36 (handler)The handler function for the 'power' tool, decorated with @mcp.tool(). It computes base raised to the power of exponent using the ** operator.@mcp.tool() def power(base: float, exponent: float) -> float: """计算幂运算""" return base ** exponent