power
Raise a base number to a given exponent and get the result. Handles invalid operations like overflow or complex results with clear errors.
Instructions
Raise a number to a power.
Args: base: The base number. exponent: The power to raise the base to.
Returns: base raised to the power of exponent.
Raises: InvalidPowerOperationError: If the result would be complex, or if the computation overflows.
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 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |