Skip to main content
Glama

Validate a cron expression

validate_cron
Read-onlyIdempotent

Check whether a cron expression is valid. Returns valid true with the expanded values of every field (minute, hour, day of month, month, day of week, and seconds for 6-field expressions), or valid false with an error code, the field at fault and a message. Detects schedules that can never run (e.g. February 30). Read-only. Same engine as GET /api/validate.

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": "validate_cron"
  }
}

Input Schema

NameRequiredDescriptionDefault
expressionYesCron expression, e.g. "0 9 * * 1-5", "*/15 * * * *", "0 30 8 * * *" (6 fields = leading seconds) or "@daily".

Output Schema

NameRequiredDescriptionDefault
errorNo
validYes
fieldsNo
formatNo
versionYes
expressionYes
normalizedNo
dayMatchingNo
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description goes further by disclosing the two outcome shapes (valid true with expanded fields, valid false with error code and offending field), the semantic-detection behavior for impossible schedules (e.g. February 30), and engine parity with GET /api/validate. This is real added context beyond the structured fields.

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 core action, then outcome shapes, then the edge case. Every sentence carries information; the GET /api/validate parity line is the only mildly incidental content.

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

Completeness4/5

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

With an output schema present, the description doesn't need to detail return values, yet it still summarizes both success and failure shapes. Slight gap: no mention of how the 200-character limit or non-cron shorthand like @daily beyond the schema example is treated, but nothing essential is missing for correct invocation.

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

Parameters3/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 the single expression parameter with examples. The description only adds a note that seconds appear for 6-field expressions, which is marginal on top of the schema, so baseline 3 applies.

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

Purpose4/5

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

Specific verb+resource: "Check whether a cron expression is valid." An agent immediately knows what it does. However, it never names or contrasts with the siblings (explain_cron, next_cron_runs, cron_runs_between), so differentiation is left to inference.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites, and no mention of when to prefer explain_cron or next_cron_runs instead. The only usage signal is implicit in the purpose sentence.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources