Skip to main content
Glama

repetition_from_prose

Parse natural-language repetition phrases like 'every Monday' or 'every 3 days' into structured RepetitionRule objects, handling ambiguous interpretations and unsupported patterns.

Instructions

Deterministic prose-to-RepetitionRule helper. Pass a natural-language phrase ('every Monday', 'every 3 days', 'first Tuesday of every month') and receive a structured RepetitionRule plus a normalized description to confirm with the user. Returns one of three shapes: { kind: 'ok', rule, normalizedDescription } when the prose maps to one rule; { kind: 'ambiguous', interpretations[] } when prose admits multiple valid readings (typically 2-3) — agent picks one with the user; { kind: 'error', reason, suggestion? } for no-repetition-detected or unsupported-pattern. Supported patterns: daily/weekly/monthly/yearly, every-N-days/weeks/months/years, every weekday/weekend, every {Mon|Tue|...}, nth-weekday-of-month, nth-day-of-month, completion-relative phrasing ('after I complete it'). Time-of-day and end-conditions surface in normalizedDescription only — the canonical RepetitionRule schema doesn't carry those fields. Do NOT use this tool when the agent already has a structured RepetitionRule from another source — call task_set_repetition directly instead. Prefer this helper over ad-hoc LLM translation whenever the user's repetition phrasing is the only signal. No model calls; no side effects. Use with task_set_repetition or task_create. Example: repetition_from_prose({ prose: "every Monday" }) Example: repetition_from_prose({ prose: "every 3 days after I complete it" })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proseYesNatural-language phrase describing a repetition cadence. Examples: 'every Monday', 'every other Tuesday at 10am', 'first Thursday of every month after I complete it'.
anchorNoOptional date anchor — currently informational. The grammar reads time-of-day from prose into normalizedDescription; embedding it into a date is the agent's responsibility once it has anchor context.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'No model calls; no side effects' and explains the three return shapes (ok, ambiguous, error) and their implications. It also notes that time-of-day and end-conditions are only in normalizedDescription. However, it does not mention potential input length limits or exact format constraints, so it is slightly less than perfectly transparent.

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?

The description is front-loaded with the core purpose and then covers return shapes, supported patterns, usage guidelines, and examples. It is thorough but not overly verbose; every sentence adds value. It could be slightly more concise, but the structure is logical and easy to follow.

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?

Given the lack of an output schema, the description fully explains the three possible return shapes and their contents. It covers supported patterns, error cases, and provides usage context (with task_set_repetition or task_create). It also clarifies the anchor parameter's informational nature. The description is complete and leaves no major gaps for the agent.

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% with both parameters having descriptions. The tool description adds significant value beyond the schema by providing examples for the prose parameter (e.g., 'every Monday', 'first Thursday of every month') and explaining the role of the anchor parameter as 'currently informational' and that embedding time-of-day is the agent's responsibility. This enhances understanding 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 clearly states it is a 'Deterministic prose-to-RepetitionRule helper' and explains its function of converting natural-language phrases to structured rules. It distinguishes itself from sibling tools like task_set_repetition by explicitly stating when not to use it: 'Do NOT use this tool when the agent already has a structured RepetitionRule from another source.' This meets the highest standard of purpose clarity.

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?

The description provides explicit guidance on when to use the tool: 'Prefer this helper over ad-hoc LLM translation whenever the user's repetition phrasing is the only signal.' It also specifies when to use an alternative: 'call task_set_repetition directly' if a structured rule already exists. This gives clear context and exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/torsday/omnifocus-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server