Documentation
¶
Index ¶
Constants ¶
const DefaultMaxResults = 1000
DefaultMaxResults caps the number of timestamps returned in a single expand_cron call to prevent memory exhaustion and oversized tool responses.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExpandCronInput ¶
type ExpandCronInput struct {
Expr string `json:"expr" jsonschema:"Cron expression (5-field, descriptor, or 6-field with seconds=true)"`
Start string `json:"start,omitempty" jsonschema:"Start timestamp in format (default: current time)"`
End string `json:"end,omitempty" jsonschema:"End timestamp in format"`
Count *int `json:"count,omitempty" jsonschema:"Maximum number of firing times to return (0 or greater)"`
Duration string `json:"duration,omitempty" jsonschema:"Duration from start time (Go duration, e.g. 24h, 3h30m)"`
Format string `json:"format,omitempty" jsonschema:"Layout or preset (datetime, date, time, rfc3339, rfc3339nano)"`
Timezone string `json:"timezone,omitempty" jsonschema:"IANA timezone name (e.g. UTC, Asia/Tokyo; default: local)"`
Seconds bool `json:"seconds,omitempty" jsonschema:"Parse 6-field cron expression with leading seconds field"`
Inclusive bool `json:"inclusive,omitempty" jsonschema:"Include start timestamp if it matches the cron expression"`
}
ExpandCronInput defines the parameters for the expand_cron tool.
type ExpandCronOutput ¶
type ExpandCronOutput struct {
Times []string `json:"times" jsonschema:"Expanded firing timestamps"`
Count int `json:"count" jsonschema:"Number of returned timestamps"`
Timezone string `json:"timezone" jsonschema:"Effective timezone used"`
Truncated bool `json:"truncated" jsonschema:"True if output was capped at the server maximum limit"`
}
ExpandCronOutput defines the structured response for the expand_cron tool.
type ValidateCronInput ¶
type ValidateCronInput struct {
Expr string `json:"expr" jsonschema:"Cron expression to validate"`
Start string `json:"start,omitempty" jsonschema:"Reference timestamp for next firing preview (default: now)"`
Format string `json:"format,omitempty" jsonschema:"Go layout or preset (datetime, date, time, rfc3339, rfc3339nano)"`
Timezone string `json:"timezone,omitempty" jsonschema:"IANA timezone name (e.g. UTC, Asia/Tokyo; default: local)"`
Seconds bool `json:"seconds,omitempty" jsonschema:"Validate as a 6-field cron expression with leading seconds"`
}
ValidateCronInput defines the parameters for the validate_cron tool.
type ValidateCronOutput ¶
type ValidateCronOutput struct {
Valid bool `json:"valid" jsonschema:"Whether the cron expression is valid"`
Error string `json:"error,omitempty" jsonschema:"Parse error message when valid is false"`
NextFire string `json:"next_fire,omitempty" jsonschema:"Next firing time after start, empty if never fires"`
Timezone string `json:"timezone" jsonschema:"Effective timezone used"`
}
ValidateCronOutput defines the structured response for the validate_cron tool.