Skip to main content
Glama

Find an nth weekday in a month

bpj_calendar_nth_weekday
Read-onlyIdempotent

Locate an ordinal weekday within a month and report a missing fifth occurrence.

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": {
      "year": "<year>",
      "month": "<month>",
      "weekday": "<weekday>",
      "occurrence": "<occurrence>"
    },
    "name": "bpj_calendar_nth_weekday"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearYes
monthYes
weekdayYes
occurrenceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds one genuine behavioral fact — that a non-existent fifth occurrence is surfaced rather than silently dropped — but says nothing about the shape of the result or how the missing case is represented.

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?

One front-loaded sentence with no padding; the scope constraint and the edge case both land immediately.

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

Completeness2/5

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

For a four-parameter, no-output-schema tool, the description leaves the return value, the numbering convention, and the representation of the 'missing fifth occurrence' undefined. An agent could invoke it but could not predict or interpret the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry parameter meaning, and it does not. It never mentions that weekday follows ISO numbering (Monday=1) or that occurrence is capped at 5, both of which are only in the schema property titles.

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?

The verb 'Locate' plus the resource 'an ordinal weekday within a month' tells an agent exactly what is computed, and the phrase 'report a missing fifth occurrence' hints at the boundary case. It does not, however, differentiate itself from close siblings such as bpj_calendar_last_weekday or bpj_calendar_recurring_weekday_mask.

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?

There is no statement of when to prefer this tool over the calendar siblings, nor any prerequisite or exclusion. The agent must infer that this is the tool for 'third Tuesday of March'-style queries.

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.