Skip to main content
Glama

Age Calculator

calculate_age
Read-onlyIdempotent

Use this when you need someone's exact age on a date, the total number of days lived, the weekday they were born on, or how many days remain until their next birthday. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.

Do not use this when you need the difference between two arbitrary dates with a business-day count (use date-difference) or a countdown to an event (use days-until). What it computes: Computes the exact age on a given date as years, months and days by Gregorian calendar arithmetic, plus total days and weeks, the weekday of birth, and the date of and days until the next birthday. Inputs: birth_date (date); as_of_date (date, optional). Complete JSON argument examples: {"birth_date":"1990-05-17","as_of_date":"2026-09-23"} | {"birth_date":"1985-12-25","as_of_date":"2026-01-10"} Outputs: years, months, days, age_text, total_days [days], total_weeks [weeks], age_decimal_years [years], next_birthday_date, days_until_next_birthday [days], day_of_week_born. Formula: years, months, days = calendar difference birth_date → as_of_date (when the day-of-month is smaller, days are borrowed from the month before as_of_date); total_days = as_of_date − birth_date; total_weeks = total_days / 7; age_decimal_years = total_days / 365.2425; next_birthday = first (month, day) of birth on or after as_of_date Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/age with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/everyday/age.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
as_of_dateNoDate on which to evaluate the age; defaults to the current UTC date.today
birth_dateYesDate of birth (ISO 8601, YYYY-MM-DD).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksNo
resultYes
requestYes
sourcesNo
successYes
versionNo
freshnessNo
timestampYes
next_actionsNo
service_versionYesDeployed Calcgrid implementation version used for the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / service_version
      Added value: +{
      +  "description": "Deployed Calcgrid implementation version used for the result.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "success",
      -  "request",
      -  "result",
      -  "timestamp"
      -]New value: +[
      +  "success",
      +  "service_version",
      +  "request",
      +  "result",
      +  "timestamp"
      +]
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "as_of_date": "2026-09-23",
      +    "birth_date": "1990-05-17"
      +  },
      +  {
      +    "as_of_date": "2026-01-10",
      +    "birth_date": "1985-12-25"
      +  }
      +]
  3. Added
  4. Removed
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds substantial behavioral detail beyond annotations: the Gregorian calendar arithmetic, the day-borrowing rule, the total_days/365.2425 decimal-age formula, next-birthday logic, and the output field list. This makes the tool's exact behavior transparent.

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 description is long but well-structured with labeled sections (Use when, Do not use, What it computes, Inputs, Examples, Outputs, Formula, REST fallback, Docs). Purpose and usage are front-loaded. The length is justified by the useful behavioral details, though the REST fallback and docs URL could be considered slightly beyond core agent needs.

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?

Given the simple 2-parameter schema, the description is fully complete: it lists all outputs, explains the calculation formula, gives complete JSON examples, names the sibling alternatives, and even provides a direct REST fallback. There is nothing an agent needs to know to call this tool correctly that is missing.

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 coverage is 100%, so the baseline is 3. The description's 'Inputs: birth_date (date); as_of_date (date, optional)' adds little beyond the schema, though the complete JSON examples and formula context reinforce the meaning. The schema already specifies defaults, formats, and examples, so no additional parameter semantics are needed.

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 uses a specific verb and resource: it computes exact age, days lived, weekday of birth, and days until next birthday. It also explicitly differentiates from the sibling calculate_date_difference by naming what it does not do. An agent can immediately tell what this tool is for.

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?

The description gives explicit when-to-use criteria ('Use this when you need...') and when-not-to-use criteria with named alternatives ('Do not use this when... use date-difference... use days-until'). This is the strongest possible usage guidance and leaves nothing 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