Skip to main content
Glama

WritersLogic business agents

week-number

Week number and week-year for dates under ISO 8601, US or custom rules (53-week years) — Returns the week number, week-year, number of weeks in that year and the week's first and last day for up to 200 dates under ISO 8601 (Monday start, week 1 holds 4 January), the US convention (Sunday start, week 1 holds 1 January) or a custom weekStart/minimalDays rule, and checks an asserted week or week-year (2027-01-01 is ISO 2026-W53). Built for an agent reading or writing week-based dates in

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": {
      "system": "<system>",
      "items": "<items>"
    },
    "name": "week-number"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYes
systemYesiso: weekStart Monday, minimalDays 4. us: weekStart Sunday, minimalDays 1. custom: give weekStart and minimalDays.
weekStartNo0=Sunday..6=Saturday (custom).
minimalDaysNoDays of the new year the first week must contain (custom).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does reasonable work: it discloses the 200-date cap, the exact return fields (week number, week-year, weeks in year, first and last day), and that it validates asserted week values. It stops short of stating what happens on a claim mismatch or which errors are raised.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded before the em-dash, but the body is one long run-on sentence that repeats 'ISO 8601' and the convention rules, and it terminates mid-phrase, wasting attention on redundant phrasing.

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?

There is no output schema, so the description must document return values, which it does explicitly for all four fields plus the validation behavior. The only shortfall is the truncated final clause and the absence of error semantics for failed assertions.

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 75% but the description adds real meaning: it spells out the ISO rule (Monday start, week 1 holds 4 January), the US rule (Sunday start, week 1 holds 1 January), the custom weekStart/minimalDays case, and clarifies that claimedWeek/claimedWeekYear are assertions being checked against the computed 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?

Names the specific resource and output (week number and week-year) and the conventions it operates under, so an agent can tell it apart from a general date converter like calendar-convert without opening the schema.

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?

The closing phrase 'Built for an agent reading or writing week-based dates' implies the usage context, and the worked example (2027-01-01 is ISO 2026-W53) shows a typical call. However, no explicit when-not guidance or named alternative is given, and the sentence is cut off mid-thought.

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