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

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +  }
      +]
  2. Added
  3. Removed
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already mark the tool as read-only and idempotent, and the description adds rich behavioral detail: the Gregorian calendar arithmetic, weekday-of-birth computation, next-birthday logic, the formula used, and even the REST fallback path. It clearly explains what the tool computes and how.

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 longer than necessary for a two-parameter tool, but it is well-structured, front-loaded with the primary use case, and every section adds practical value such as output fields, formula, and fallback. It is thorough rather than wasteful.

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 schema and available output schema, this description is complete: it covers what the tool returns, how the formula works, when the optional parameter defaults, how to call it directly, and where to find documentation. No critical context 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?

The input schema already documents both parameters with formats, defaults, and examples, so the description's mention of 'birth_date (date); as_of_date (date, optional)' adds little beyond the schema. The formula does clarify how the parameters interact, but it is more about behavior than parameter-specific semantics.

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 states a specific verb and resource: computing a person's exact age on a date, along with related calendar facts. It clearly differentiates itself from sibling date tools by listing the exact conditions under which this tool is appropriate.

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?

Usage guidance is explicit: it says when to call this tool ('when you need someone's exact age on a date') and when not to, naming alternatives like date-difference and days-until. This leaves no ambiguity about tool selection.

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