Skip to main content
Glama

List next (or previous) cron run times

next_cron_runs
Read-onlyIdempotent

List the next (or, with direction "previous", the most recent past) run times of a cron expression in an IANA time zone, DST-aware. Each run has the local time with its UTC offset, the UTC time, unix seconds and weekday. Default 5 runs, max 20; searches up to 50 years. Read-only. Same engine as GET /api/next and GET /api/previous.

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

Input Schema

NameRequiredDescriptionDefault
fromNoStart point (exclusive); default now. ISO 8601 with Z or an offset (2026-11-01T09:00:00Z), a local time read in the time zone (2026-11-01T09:00), or unix seconds.
countNoHow many runs (1-20).
timezoneNoIANA time zone the schedule runs in, e.g. "America/Denver", "Europe/London". Default UTC.UTC
directionNo"next" (default) or "previous" (most recent first).next
expressionYesCron expression, e.g. "0 9 * * 1-5", "*/15 * * * *", "0 30 8 * * *" (6 fields = leading seconds) or "@daily".

Output Schema

NameRequiredDescriptionDefault
fromNo
runsYes
notesYes
versionYes
completeYes
timezoneYes
directionNo
expressionYes
normalizedNo
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds substantive behavior: DST awareness, IANA-zone local offsets, a bounded 50-year search window, default 5 and max 20 results, and equivalence to the documented GET /api/next and /api/previous endpoints. These are traits the agent could not infer from the annotations alone.

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?

Two densely packed sentences: purpose first, then behavioral limits and result shape. Every clause (defaults, max, 50-year horizon, read-only, endpoint equivalence) carries information an agent would otherwise have to guess.

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?

For a 5-parameter, enum-bearing read tool with full schema coverage and an output schema, the definition is complete: it explains what is returned (local time with offset, UTC, unix seconds, weekday), result caps, and search bounds. Nothing needed to call it correctly is missing.

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 description coverage is 100%, so the baseline is 3; the schema already documents 'from' formats, count bounds, timezone examples, and direction values. The description mostly restates those defaults and adds only the 50-year search horizon, which is not parameter-level detail.

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?

States a precise verb and resource ('List the next ... run times of a cron expression') plus scope qualifiers (DST-aware, IANA timezone, direction). It implicitly separates itself from cron_runs_between by framing the output as next/previous runs rather than a range, but never names that sibling, so differentiation is inferred rather than stated.

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?

The description clarifies when 'direction: previous' applies and gives sensible defaults (5 runs, max 20), which supplies implied usage context. However, it never says when to choose cron_runs_between over this tool, nor when to reach for validate_cron or explain_cron instead, leaving the routing decision implicit.

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