Skip to main content
Glama

WritersLogic business agents

recurrence-expand

Expand an RRULE or 5-field cron into concrete occurrences with DST handling, exclusions and conflict detection — Expands an RFC 5545 RRULE (FREQ DAILY/WEEKLY/MONTHLY/YEARLY, INTERVAL, COUNT, UNTIL, BYDAY with ordinals, BYMONTHDAY, BYMONTH, BYSETPOS, WKST; DTSTART with TZID; EXDATE) or a crontab(5) expression into up to 366 occurrences in a time zone, with the UTC instant of each, DST gap or overlap flags, caller blackout dates, a plain-English reading, and optionally the occurrences where it collides with a

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": {
      "kind": "<kind>",
      "rule": "<rule>"
    },
    "name": "recurrence-expand"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLocal end of the window, inclusive.
fromNoLocal start of the output window; required for cron, default DTSTART for rrule.
kindYes
ruleYesrrule: 'DTSTART;TZID=America/New_York:19970902T090000\nRRULE:FREQ=DAILY;COUNT=10\nEXDATE;TZID=America/New_York:19970903T090000' or just 'FREQ=...' with dtstart. cron: '*/15 9-17 * * 1-5' (dom and dow both restricted match if either does).
limitNoMaximum occurrences returned (default 20).
otherNoA second rule to compare; conflicts are occurrences whose intervals overlap (equal instants when both durations are 0).
dtstartNoLocal DTSTART when the rule text has none.
exdatesNoExtra excluded local date-times (YYYY-MM-DDTHH:MM[:SS]) or dates (YYYY-MM-DD, excludes that day).
timeZoneNoIANA zone for local times (required for cron; for rrule unless DTSTART has TZID or Z).
blackoutsNoInclusive local date ranges to drop (holidays, freezes).
durationMinutesNoOccurrence length, for conflict overlap.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does well on output behavior — UTC instants, DST gap/overlap flags, blackout exclusions, plain-English reading, conflict detection, and a 366 ceiling — but it never states error behavior or how ambiguous DST times are resolved, and the final clause is cut off mid-sentence ('collides with a '), leaving the conflict output undefined.

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

Conciseness3/5

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

The definition says the same thing twice — a lead-in summary followed by a '—' and a near-identical second pass enumerating the same RRULE parts — which doubles length without adding information. Front-loading is good, but the trailing sentence is truncated, ending the description on an unfinished thought.

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

Completeness3/5

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

With 11 parameters, a nested object, and no output schema, the description needs to cover return values, and it largely does (UTC instant, DST flags, plain-English reading). However the truncated ending leaves the conflict-detection result undescribed — the one part of the return shape the agent cannot infer — so the whole is adequate but incomplete.

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 91%, so the schema already documents nearly every parameter well; the description mainly restates them (DST handling, exclusions, conflict detection, limit). The one area it could add value, the nested 'other' comparison rule, is lost to truncation, so it adds marginal meaning beyond the schema.

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?

The description opens with a specific verb and resource: 'Expand an RRULE or 5-field cron into concrete occurrences', then enumerates the supported RFC 5545 parts and the crontab(5) alternative. An agent can tell exactly what this computes and what inputs it accepts without opening the schema.

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 implies the use case (materializing a recurrence into dated occurrences) and states prerequisites such as 'required for cron; for rrule unless DTSTART has TZID or Z', but never says when to reach for this versus a plain calendar conversion or scheduling tool, and offers no explicit exclusions.

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