Skip to main content
Glama

Leer fecha y hora

datetime-parse
Read-onlyIdempotent

Analiza una fecha/hora ISO 8601 o RFC 2822 y devuelve ISO UTC, Unix, hora local con desfase, día de la semana, semana ISO y trimestre. Cuándo: un resultado de fechas, zonas horarias o calendario tiene que ser exacto (desfases, horario de verano, fines de mes, bisiestos). No para: formatear una fecha/hora en una zona e idioma con estilos Intl o un patrón (datetime-format). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Parses an ISO 8601 or RFC 2822 date-time (or YYYY-MM-DD) and returns UTC ISO, Unix seconds/ms, local wall time in a time zone with offset, weekday, day of year, ISO week, quarter and leap-year flag. When: a date, time-zone or calendar result has to be exact (offsets, daylight saving, month ends, leap years). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
datetimeYesISO 8601 date-time (with Z/offset, or naive local time in `timezone`) or YYYY-MM-DD (string; required; up to 40 chars).
timezoneNoZone for naive input and for local output (string; optional; default "UTC"; up to 64 chars).UTC

Output Schema

NameRequiredDescriptionDefault
utcNo
unixNo
localNo
offsetNo
quarterNo
unix_msNo
weekdayNo
iso_weekNo
timezoneNo
leap_yearNo
day_of_yearNo
iso_week_yearNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / datetime / examples
      Added value: +[
      +  "2026-10-31T12:00:00Z"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Parses an ISO 8601 or RFC 2822 date-time (or YYYY-MM-DD) and returns UTC ISO, Unix seconds/ms, local wall time in a time zone with offset, weekday, day of year, ISO week, quarter and leap-year flag. When: a date, time-zone or calendar result has to be exact (offsets, daylight saving, month ends, leap years). Not for: formatting an instant in a time zone and locale, either with Intl styles (datetime-format). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description still adds real context beyond them: explicit 'no side effects / no network / no stored state', determinism, and concrete limits (64 KB input, 1 s per call, 1 MB result), which are operationally useful for batching decisions.

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 purpose, then when, when-not, effects and limits in a predictable order — no filler sentences. It is somewhat verbose for a two-parameter tool, and the full English text is duplicated in both the description and inputSchema.description, which is redundant but not harmful.

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?

With an output schema present and full parameter coverage, the description covers everything an agent needs to decide and call correctly. The only minor gap is not stating the failure behavior for unparseable or out-of-range inputs, which matters for a parser that will reject malformed strings.

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 100% and both parameters carry their own descriptions plus a default for timezone, so the schema does the heavy lifting. The description only re-states the accepted formats and implies the naive-input/timezone relationship; it adds no syntax or edge-case detail (e.g., how conflicting input offset vs. timezone argument is resolved) beyond 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?

States a specific verb (parse) plus accepted input formats (ISO 8601 / RFC 2822 / YYYY-MM-DD) and enumerates the derived fields returned (UTC, Unix, local with offset, ISO week, quarter). It also names the adjacent sibling datetime-format as out of scope, so an agent can distinguish the two without opening a schema.

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

Usage Guidelines5/5

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

Explicit 'Cuándo' clause defines the trigger condition (exactness in offsets, DST, month ends, leap years) and an explicit 'No para' clause routes formatting-with-locale/Intl-pattern work to datetime-format. Both the when and the when-not are stated, with the alternative named.

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