calculate_age
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 ...
This record as markdown: /tools/com-tttkmbb-calcgrid/calculate-age.md
What calculate_age does on Calcgrid
AI agents call calculate_age to retrieve information from Calcgrid without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
as_of_date | string | — | Date on which to evaluate the age; defaults to the current UTC date. |
birth_date | string | Yes | Date of birth (ISO 8601, YYYY-MM-DD). |
Parameters from the server's own tool schema.
Why calculate_age is rated Low
Even though calculate_age only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.
Attacks that exploit this kind of access
The rule that runs calculate_age safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Calcgrid, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For calculate_age, this is the rule to start with:
calculate_age is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Calcgrid, apply this rule, and every calculate_age call is checked against it from then on.
Questions about calculate_age
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. It is categorised as a Read tool in the Calcgrid MCP Server, which means it retrieves data without modifying state.
calculate_age accepts 2 parameters: as_of_date, birth_date. Required: birth_date. The full parameter table on this page comes from the server's own tool schema.
Register the Calcgrid MCP server in PolicyLayer and add a rule for calculate_age: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Calcgrid. Nothing to install.
calculate_age is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the calculate_age rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for calculate_age. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
calculate_age is provided by the Calcgrid MCP server (https://tttkmbb.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Calcgrid, and thousands of servers like it.
This server
Across the catalogue