Skip to main content
Glama

Validate a schedule

cron_validate_schedule
Read-onlyIdempotent

Validate a cron expression before saving a job and get valid true/false, exact engine error, plain-English description, normalized form, warnings, and first scheduled run.

Instructions

Check a cron expression before saving it as a job: valid true/false with the engine's exact error (including wrong-field hints for Quartz-style forms), the plain-English description, the normalized form, advisory warnings, and the first scheduled run, all from the server's scheduling engine. The dialect includes L (last day), L-n (n days before it), nW / LW (nearest / last weekday) and Ln / d#n (last / nth weekday: L5 = last Friday, 5#3 = third Friday). Use it before saving a new or changed schedule; use cron_explain_schedule to list more upcoming runs, or cron_why_no_run for a job that already exists.

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": {
      "expression": "<expression>"
    },
    "name": "cron_validate_schedule"
  }
}

Input Schema

NameRequiredDescriptionDefault
tzNoIANA time zone the job will run in. It turns on the daylight saving time checks.
seedNoName of the job that will use the expression, which resolves Jenkins-style H fields to that job's slot. For a workflow's schedule, use dag:<name>. Required when the expression uses H.
expressionYesCron expression, such as 0 3 * * 1-5.

Output Schema

NameRequiredDescriptionDefault
lintNo
seedNo
errorNo
firesNo
validYes
rebootNo
resolvedNo
timezoneYes
expressionYes
normalizedNo
descriptionNo
never_firesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.2.73
    • addedInput schema / properties / expression / description
      Added value: +"Cron expression, such as 0 3 * * 1-5."
    • addedInput schema / properties / seed / description
      Added value: +"Name of the job that will use the expression, which resolves Jenkins-style H fields to that job's slot. For a workflow's schedule, use dag:<name>. Required when the expression uses H."
    • addedInput schema / properties / tz / description
      Added value: +"IANA time zone the job will run in. It turns on the daylight saving time checks."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds genuine context beyond them: results come from the server's actual scheduling engine, an invalid expression returns the engine's exact error with wrong-field hints, and advisory warnings are surfaced. It doesn't discuss cost or limits, but nothing important is left implicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the outcome the caller gets, followed by dialect detail, then routing. The dialect sentence is dense but every clause maps to a real calling decision; a slightly tighter phrasing of the return list would earn a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return formatting needn't be spelled out, yet the description still names the salient fields. For a read-only validator with three fully documented parameters, an agent has everything needed to call it correctly and interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already documents tz and seed well, so the baseline is 3. The description earns above baseline by defining the expression dialect (L, L-n, nW/LW, Ln, d#n) with worked examples like L5 = last Friday and 5#3 = third Friday, which directly affects what a caller may pass.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Check a cron expression') and enumerates exactly what comes back: valid true/false, engine error, plain-English description, normalized form, warnings, first run. It is clearly distinguishable from siblings like cron_explain_schedule and cron_why_no_run.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to use it ('before saving a new or changed schedule') and names the two alternatives with the condition that selects each: cron_explain_schedule for more upcoming runs, cron_why_no_run for an existing job that isn't firing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.