Skip to main content
Glama

convert_date

Convert between a calendar date, its day number, and its Gregorian date. Give exactly one of date, day_number, gregorian or one of their plurals dates, day_numbers, gregorians; all three forms come back, with whether the year is a leap year, how long it is, and any named period of the year the date falls in. USE THE PLURALS FOR MORE THAN ONE DATE: the calendar spec travels on every call, so fifteen dates in one call cost the spec once instead of fifteen times, and there is no reason to work an answer out by hand to save a round trip. Answers up to 1000 in one call, in the order given, as {count, ok, results}. Prefer this over one call per item: the spec travels once instead of once each. Exact arithmetic; never estimates. A date that does not exist in this calendar is refused with the real range, never rounded to a nearby day.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNo
timeNo
datesNo
calendarYes
on_errorNofail
gregorianNo
day_numberNo
gregoriansNo
day_numbersNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed5 schema fields changed
    • addedInput schema / properties / dates
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Dates"
      +}
    • addedInput schema / properties / day_numbers
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "integer"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Day Numbers"
      +}
    • addedInput schema / properties / gregorians
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Gregorians"
      +}
    • addedInput schema / properties / on_error
      Added value: +{
      +  "default": "fail",
      +  "title": "On Error",
      +  "type": "string"
      +}
    • addedInput schema / properties / time
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {
      +        "type": "integer"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Time"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

No annotations are provided, so the description must fully disclose behavior, and it does: it states exact arithmetic, refusal of nonexistent dates instead of rounding, the response shape {count, ok, results}, order preservation, and the calendar-spec cost model. This is far beyond minimal and gives the agent a reliable mental model of side effects, limits, and error behavior.

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?

The core purpose is front-loaded and the content is organized into input, batching, response, exactness, and error handling. Some redundancy exists — the calendar-spec cost point is made twice — and the all-caps plural instruction adds emphasis but also length. Overall, it is well-structured for a tool with this complexity.

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?

For a tool with no output schema, no annotations, nested objects, and 9 parameters, the description covers the essentials: accepted input combinations, batching, limits, return envelope, exactness, and failure behavior. The main gaps are the undocumented 'time' and 'on_error' parameters and the lack of a detailed result-schema breakdown, but the description is still strong enough for correct invocation in most cases.

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 description coverage is 0%, so the description must compensate. It explains the singular/plural input constraint, which parameter groups are mutually exclusive, the role of calendar, batching semantics, and general output behavior. However, it does not clarify the 'time' or 'on_error' parameters, which remain underspecified even though they are in the schema.

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 opens with a specific action, 'Convert between a calendar date, its day number, and its Gregorian date,' clearly identifying both the operation and the resource. It further distinguishes the tool by stating that all three forms are returned together, along with leap-year, year-length, and named-period information. This is enough to separate it from siblings like parse_calendar_date or format_calendar_date.

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?

The description gives concrete usage guidance: provide exactly one of date, day_number, gregorian, or their plurals, and use plurals when handling multiple dates. It also explains batching preferences and the 1000-item limit. It does not explicitly name sibling tools or state when to prefer an alternative, so it stops short of a 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.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool targets a distinct date/calendar operation: arithmetic, conversion, weekday lookup, period membership, moon phase, daylight, event queries, formatting/parsing, and two different rendering outputs. Even superficially similar tools (calendar_weekday vs nth_weekday_of_month, calendar_events vs calendar_periods) ask clearly different questions that the descriptions make unambiguous.

Naming Consistency4/5

Names are all lowercase snake_case and mostly follow a verb_first or noun_query pattern, but there is a mix: add_to_date, convert_date, and parse_calendar_date are imperative, while moon_phases, sun_daylight, and calendar_events are noun phrases describing what they return. The calendar_ prefix on three tools and consistent rendering parse/format pairs help readability, so this is a minor deviation, not chaos.

Tool Count5/5

15 tools sits at the upper bound of the ideal range for a focused domain toolkit. Every tool addresses a genuine calendar use case (define, convert, query, render, validate, generate), and none feels redundant or extraneous.

Completeness5/5

The set covers the full lifecycle of working with a custom calendar: validation before use, conversion between representations, date arithmetic and intervals, weekday and period queries, recurring events and daylight/moon data, formatting/parsing, and visual rendering. No obvious dead ends or missing operations come to mind for the stated domain.

Resources