power
Perform power calculations by entering a base and exponent, enabling accurate results for numerical operations on the Calculator MCP server.
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() for registration, computes the power using base ** exponent with input types float and output float.@mcp.tool() def power(base: float, exponent: float) -> float: """计算幂运算""" return base ** exponent