Skip to main content
Glama

Cron expression explainer

cron_expression
Read-onlyIdempotent

Reads a classic 5-field cron expression (or @daily, @hourly, @reboot) and returns a plain-English description, the expanded form and the next run times in UTC.

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_expression"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromNoISO 8601 date and time to count from. Defaults to now.
countNoHow many upcoming runs to list. Defaults to 5.
expressionYesFive fields: minute hour day-of-month month day-of-week, such as 15 3 * * 1, or a macro such as @daily.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

The tool is read-only, idempotent and closed-world per annotations, so the safety burden is already met; the description adds genuinely useful behavior beyond that by naming the accepted input dialects (5-field classic plus @daily/@hourly/@reboot) and disclosing that results are reported in UTC and include upcoming runs. It stops short of describing failure modes for malformed expressions or how @reboot behaves with no future runs.

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

Conciseness5/5

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

A single front-loaded sentence with the input form first and the return contents second; no filler, hedging, or redundancy with the schema.

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 no output schema, the description carries the return-value burden and does so by listing the three outputs explicitly, and its three parameters are fully covered by the schema. The only meaningful gap is edge-case behavior (invalid expressions, @reboot next runs, timezone assumptions in 'from'), which is minor for this tool's complexity.

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 each parameter is well documented, so the baseline would be 3; the description adds value by enumerating macro forms beyond the schema's single '@daily' example and by tying output to UTC, which clarifies how the 'from' parameter is interpreted. It still does not explain the relationship between 'from' and 'count' or the default count behavior.

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 ('Reads a classic 5-field cron expression') plus exactly what it produces: a plain-English description, the expanded form, and next run times. An agent knows precisely what the tool does without opening the schema, and the sibling list (DNS/email utilities) contains nothing that overlaps.

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

Usage Guidelines3/5

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

Usage is implied by the function itself (you have a cron string and want it explained or its next runs), but there is no explicit when-to-use or when-not statement and no named alternative. For a self-contained utility with no behavioral siblings this is adequate, though the description never says it errors on invalid expressions or that it does not evaluate timezones other than UTC.

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