sqrt
Calculate the square root of a non-negative number, returning the result and operation status. Useful for quick and accurate square root computations in mathematical workflows.
Instructions
Calculate the square root of a given number.
Args:
data (SingleNumberOperation): An object containing the input number a.
Returns:
Dict[str, Any]: A dictionary containing the operation name, result,
and status of the operation.
Raises:
ValueError: If the input number a is negative.
Notes:
- Logs the operation and result using the logger.
- Returns a success response if the operation is successful.
- Returns an error response if an exception occurs.
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": {
"data": "<data>"
},
"name": "sqrt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||