Skip to main content
Glama

Agent Data Tools: Utilities

Age calculator: exact age from a date of birth and the next birthday

calc_age
Read-only

Exact age from a date of birth in years, months and days, total days lived, the weekday of birth, and the date of and days until the next birthday, measured today (UTC) or on any date you give. Use for age checks, forms and anniversaries. Example: birthdate=1990-05-17. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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": {
      "birthdate": "<birthdate>"
    },
    "name": "calc_age"
  }
}

Input Schema

NameRequiredDescriptionDefault
onNoMeasure on this date, YYYY-MM-DD (default today)
birthdateYesDate of birth, YYYY-MM-DD

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds material context annotations cannot express: per-call pricing ($0.01 via x402 USDC or card key), the first 10 free, failed calls free, non-free repeats, and that measurement defaults to today in UTC. Minor redundancy in restating that it changes nothing.

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 output list is front-loaded in the opening sentence, followed by usage, example and billing constraints. Content mostly earns its place, though the pricing is stated twice in compressed form ('$0.01/call ... each call is charged, so repeats are not free') and 'changes nothing' duplicates the annotation.

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?

With only two parameters, full schema coverage and no output schema, the description carries the whole burden of describing return values and it does so explicitly (age components, total days, weekday, next birthday). Billing and default-date behavior round out what an agent needs before calling.

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 beyond the schema: it clarifies that measurement happens 'today (UTC) or on any date you give', which pins down the timezone semantics of the 'on' override that the schema only calls 'default today'. The concrete example birthdate=1990-05-17 confirms the expected format.

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 precise computation and enumerates its outputs: exact age in years/months/days, total days lived, birth weekday, and next-birthday date and countdown. An agent can tell this apart from generic siblings like date_diff or date_info because the resource (age from a birthdate) is unambiguous.

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

Usage Guidelines4/5

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

Gives clear positive context ('Use for age checks, forms and anniversaries') plus a worked example invocation, so an agent knows when it applies. It stops short of naming when NOT to use it or pointing at alternatives such as date_diff when only a raw interval is needed.

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