Skip to main content
Glama

Calcular edad

age-calculate
Read-onlyIdempotent

Calcula la edad exacta en años, meses y días a una fecha de referencia, días vividos y días para el próximo cumpleaños. Cuándo: un resultado de fechas, zonas horarias o calendario tiene que ser exacto (desfases, horario de verano, fines de mes, bisiestos). No para: calcular la diferencia entre dos fechas (date-between). 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: Computes the exact age in years, months and days on a reference date (required, for determinism), total days lived, and days until the next birthday (Feb 29 birthdays observed on Feb 28 in common years). When: a date, time-zone or calendar result has to be exact (offsets, daylight saving, month ends, leap years). Not for: computing the difference between two dates or date-times (date-between). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
as_ofYesReference date YYYY-MM-DD (string; required; up to 10 chars; format date).
birth_dateYesBirth date YYYY-MM-DD (string; required; up to 10 chars; format date).

Output Schema

NameRequiredDescriptionDefault
daysNo
yearsNo
monthsNo
total_daysNo
next_birthdayNo
birthday_todayNo
days_until_next_birthdayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / as_of / examples
      Added value: +[
      +  "2026-10-31"
      +]
    • addedInput schema / properties / birth_date / examples
      Added value: +[
      +  "1990-05-15"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Computes the exact age in years, months and days on a reference date (required, for determinism), total days lived, and days until the next birthday (Feb 29 birthdays observed on Feb 28 in common years). When: a date, time-zone or calendar result has to be exact (offsets, daylight saving, month ends, leap years). Not for: computing the difference between two dates or date-times (date-between). 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.8/5.0
Behavior5/5

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

While annotations already declare readOnly/idempotent/non-destructive, the description adds context they don't carry: no network, no stored state, determinism guarantee, hard limits (64 KB input, 1 s per call, 1 MB result), and the specific leap-year rule for Feb 29 birthdays. This is substantive behavioral disclosure beyond structured fields.

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?

Well front-loaded: purpose first, then when/not-for, then side effects, determinism, and limits. However, the Spanish and English blocks duplicate the same content and the trailing 'full EN: inputSchema.description' pointer is padding rather than information.

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

Completeness5/5

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

For a 2-parameter read-only computation with full schema coverage and an output schema, the description covers everything an agent needs: semantics, sibling disambiguation, edge cases, limits, and determinism. No gaps remain for correct invocation.

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 100%, so the baseline is 3, but the description adds meaning the schema doesn't: as_of is framed as a reference date that is required specifically for determinism, clarifying why both dates are mandatory. It does not add format detail beyond the schema's date/YYYY-MM-DD constraints.

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 first sentence names a specific verb and resource and enumerates the exact outputs: age in years/months/days, days lived, and days until next birthday. It explicitly distinguishes itself from the sibling date-between, so an agent can route without opening either 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?

Uses explicit 'Cuándo'/'When' and 'No para'/'Not for' framing, naming the exact alternative (date-between) and the condition that selects it (exact date/timezone/calendar results vs. difference between two dates). Nothing is left to inference.

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