Skip to main content
Glama

Find the last weekday of a kind

bpj_calendar_last_weekday
Read-onlyIdempotent

Find the last occurrence of a chosen ISO weekday by counting back from month end.

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>"
    },
    "name": "bpj_calendar_last_weekday"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearYes
monthYes
weekdayYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world behavior, so the safety profile is covered. The description adds the useful methodological detail that the search counts backward from month end, which resolves ambiguity when a weekday occurs four or five times. It says nothing about the return value or how edge cases (e.g., month ending exactly on that weekday) are handled.

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?

A single tight sentence with the object of the operation front-loaded and no filler. It could have carried one more clarifying clause at little cost, but nothing present is wasted.

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?

This is a simple pure calculation with complete annotations and three well-bounded parameters, so the description need not do much. However, with no output schema, the agent is left guessing whether the result is an ISO date string, a day-of-month integer, or an object, which is a real gap for a date tool.

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 0%, but the schema's own titles carry meaning ('Gregorian year', 'ISO weekday (Monday = 1)') along with min/max bounds. The description reinforces the ISO convention and confirms that year/month define the target month, but adds no new constraints or examples beyond that.

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 description states a specific verb ('Find') and a specific resource ('the last occurrence of a chosen ISO weekday'), scoped to a month. This distinguishes it reasonably from the nth-weekday sibling by emphasizing the final occurrence, though it does not name that sibling explicitly.

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?

Usage is only implied: the phrase 'by counting back from month end' signals this is for locating the final instance of a weekday in a given month. There is no explicit when-to-use, when-not-to-use, or pointer to alternatives such as bpj_calendar_nth_weekday.

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.