time_leap_year_checker
Check if a year is a leap year under Gregorian rules, list leap years in an inclusive range, or find the next leap years from a start year. Supports BCE years from -9999 to 9999.
Instructions
Leap Year Checker (Gregorian). Determine whether a year is a leap year under the Gregorian rule (divisible by 4, except centuries not divisible by 400), list every leap year in an inclusive year range, or find the next N leap years from a starting year. Set operation to check (with year), range (with from and to), or next (with startYear and count). Supports BCE via negative years from -9999 to 9999. Use time_date_calculator for date arithmetic and time_day_of_week for weekday lookups; this tool only answers leap-year questions. Runs locally on the integers you provide: read-only, non-destructive, contacts no external service, and is rate-limited (60 requests/minute for anonymous callers). Returns the operation echo plus a data object whose shape depends on the operation (isLeap and reason for check, leapYears for range, years for next).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "time_leap_year_checker"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No | Which calculation to run: check tests one year, range lists leap years between from and to, next returns the next count leap years from startYear. | |
| year | No | Year to test (operation check only). Required for check; integer from -9999 to 9999, negative for BCE. | |
| from | No | Inclusive start year of the scan (operation range only). Must be less than or equal to to. | |
| to | No | Inclusive end year of the scan (operation range only). Must be greater than or equal to from. | |
| startYear | No | First year considered when collecting upcoming leap years (operation next only); the start year itself is included if it is a leap year. | |
| count | No | How many leap years to return (operation next only); integer from 1 to 50. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No | The operation that was run (check, range, or next). | |
| data | No | Operation-specific result payload. |