Skip to main content
Glama

calculate_age

Read-onlyIdempotent

Age calculator — years/months/days between dates

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "startDate": "<startDate>"
    },
    "name": "calculate_age"
  }
}

Input Schema

NameRequiredDescriptionDefault
endDateNoAge on this date as YYYY-MM-DD. Default: today.
startDateYesDate of birth as YYYY-MM-DD, for example 1990-05-17.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / endDate / description
      Added value: +"Age on this date as YYYY-MM-DD. Default: today."
    • addedInput schema / properties / startDate / description
      Added value: +"Date of birth as YYYY-MM-DD, for example 1990-05-17."
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so the safety profile is fully covered elsewhere. The description's only added behavioral fact is the shape of the result — a years/months/days breakdown — which is genuinely useful since no output schema exists. It says nothing about how partial periods are rounded or what happens with invalid/reversed dates.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single em-dash-delimited line with the operation first and the output units second. No filler, no redundancy with the title.

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 two-parameter read-only calculator with full schema coverage, the definition supplies what matters: the computation and the result decomposition. The remaining gap is behavioral edge cases, which is a modest omission for a tool this simple.

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%, including the format examples and the default of "today" for endDate, so the schema already carries parameter meaning. The description adds no semantics beyond the schema — no note on whether startDate must precede endDate or on timezone handling. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific operation and its inputs/outputs: "years/months/days between dates." That is far more informative than the bare name calculate_age, since it reveals the unit breakdown of the result. It stops short of differentiating itself from other date-oriented siblings such as calculate_pregnancy_due_date, so it lands at 4 rather than 5.

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

Usage Guidelines2/5

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

There is no guidance on when to use this instead of an alternative, no mention of edge cases (endDate before startDate, future dates), and no stated preconditions. Usage is only implied by the phrase "between dates."

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