gcd
Calculate the greatest common divisor of two integers. Get the largest number that divides both inputs without a remainder.
Instructions
Calculate the Greatest Common Divisor (GCD) of two numbers.
Args:
data (TwoNumberOperation): An object containing two numbers, a and b.
Returns:
Dict[str, Any]: A dictionary containing the operation result or an error message.
Raises:
ValueError: If inputs are not integers.
Notes:
- Both numbers must be integers.
- Returns the largest number that divides both inputs.
- Logs the operation and result.
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": "gcd"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||