Skip to main content
Glama

Next occurrence of an event or weekday

next_occurrence
Read-onlyIdempotent

The next occurrence strictly after the base date (default today) of either a tracked event slug (e.g. "christmas") or a weekday (0 = Sunday .. 6 = Saturday). Provide exactly one of event/weekday.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tzNoIANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC.UTC
fromNoISO date YYYY-MM-DD, or "today" (resolved in tz)
eventNoEvent slug (e.g. christmas). Exactly one of event/weekday.
weekdayNo0 = Sunday .. 6 = Saturday. Exactly one of event/weekday.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
answerYesThe calculated answer (kind-discriminated)
receiptYesAuditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / event / description
      Added value: +"Event slug (e.g. christmas). Exactly one of event/weekday."
    • addedInput schema / properties / weekday / description
      Added value: +"0 = Sunday .. 6 = Saturday. Exactly one of event/weekday."
  2. First observed

TDQS

A3.6/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering safety. The description adds useful behavioral context: 'strictly after' (exclusive of base date), 'default today', and 'exactly one of event/weekday'. It does not contradict annotations, but it omits edge-case behavior (e.g., unknown event slug, both provided) – though the output schema may cover errors. This is adequate but not rich.

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?

The description is two concise sentences, front-loaded with the core purpose. It efficiently communicates the primary function and the one-of constraint without any filler. Every clause earns its place.

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?

Given the tool's simplicity (4 params, 0 required, output schema present), the description covers the essential behavior: what it returns, the base date default, and the exclusivity. It does not discuss error handling or timezone implications beyond the schema, but the output schema and annotations compensate. The description is adequate for an agent to call the tool correctly in most scenarios.

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 description adds little beyond the schema: it reiterates 'exactly one' and mentions the default base date, but does not elaborate on the tz semantics or the event slug format beyond examples. The schema already documents all parameters, so the description adds marginal value.

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 the tool computes the next occurrence of a tracked event slug or a weekday, strictly after a base date. It distinguishes itself from siblings like holidays or business_days by explicitly covering event slugs and weekdays, and even specifies the weekday numbering. The verb and resource are implicit but unambiguous.

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?

The description does not provide any guidance on when to use this tool versus the siblings (e.g., holidays, business_days). It only mentions the one-of constraint between event and weekday, which is parameter usage, not tool selection. There are no exclusions or alternative recommendations, so an agent must infer the appropriate context.

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