Skip to main content
Glama

Time of Meeting

Next weekday in a month

next_occurrence
Read-onlyIdempotent

Find the next date on or after start that is the first, second, third, fourth, fifth, or last given weekday of its month. Use for questions like the date of the last Friday of the month. weekday is Mon, Tue, Wed, Thu, Fri, Sat, or Sun. start defaults to today (UTC). Example: start 2026-10-23, weekday Fri, occurrence last is 2026-10-30, the last Friday of October. If that month's occurrence is before start, the answer is in a later month: the first Monday on or after 2026-10-23 is 2026-11-02. A fifth weekday that the month does not have is skipped. The result is that date, its month, iso_week, and us_week. The request is not repeated.

Input Schema

NameRequiredDescriptionDefault
startNoSearch from this date, inclusive. Defaults to today (UTC).
weekdayYesMon, Tue, Wed, Thu, Fri, Sat, or Sun.
occurrenceYesWhich of that weekday in the month. last is the final one.

Output Schema

NameRequiredDescriptionDefault
dateYes
errorNo
monthYes
weeksYesISO week (Monday start; week 1 contains the year's first Thursday) and US week (Sunday start; 1 January is week 1 of that calendar year).
candidatesNo
alternativesNoOther cities that matched the same name, after the best-ranked city was chosen. The order is the site search order: match, then priority, then population.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint/idempotentHint annotations, it discloses the non-obvious rules that determine the answer: start is inclusive, a rolled-over month is searched if the occurrence already passed, and a nonexistent fifth weekday is skipped. Worked examples for both the same-month and next-month branches make the behavior unambiguous.

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?

Front-loaded with the core definition, then examples, then edge cases – a sensible order with little filler. The final sentence listing returned fields ('that date, its month, iso_week, and us_week') is largely redundant given the output schema, costing some tightness.

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?

All three parameters, the default value, the rollover and skip edge cases, and the response shape are covered; the output schema exists, so return values need no further elaboration. An agent has everything needed to call this correctly on the first attempt.

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 enums for weekday and occurrence, so the baseline is 3; the description adds real meaning by explaining that start defaults to today (UTC) and how the occurrence labels interact with the month boundary. The 'request is not repeated' phrasing is a slight deduction because it obscures whether start is echoed back.

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?

Opens with a specific verb-and-resource statement ('Find the next date on or after start that is the first... or last given weekday of its month') that pins down both the operation and its ordinal-of-month semantics. That framing is clearly distinct from siblings like add_days, days_between, or week_number.

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

Usage Guidelines4/5

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

Gives an explicit use case ('Use for questions like the date of the last Friday of the month'), so an agent can pattern-match typical requests. It never names an alternative tool or states when another tool is the better choice, so it stops short of 5.

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