Skip to main content
Glama

Date Calculator API - days between dates, add or subtract time

date_calculator
Read-onlyIdempotent

Days, weeks, months and years between two dates, or add/subtract days, weeks, months or years to a date. Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/call via x402 at https://radarbg.com/x402/date-calculator.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "date": "2026-01-01",
      "mode": "between",
      "date2": "2026-12-31"
    },
    "name": "date_calculator"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYesDate YYYY-MM-DD
modeNobetween, add or subbetween
unitNodays, weeks, months or yearsdays
date2NoSecond date (mode=between)
numberNoHow many (mode=add/sub)
includeBothNoCount first and last day (mode=between)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / number / minimum
      Added value: +0
  2. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already cover read-only and idempotency, and the description adds genuinely useful operational context: server-side execution, 5 calls/day per IP free tier, and two paid paths with the X-API-Key header named. The 'files are deleted right after the call' sentence is boilerplate that does not fit a stateless date tool and adds mild noise, which keeps this from a 5.

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

Conciseness3/5

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

The capability sentence is well front-loaded, but roughly half the text is pricing and auth boilerplate, plus an irrelevant 'files are deleted' clause. The auth/rate-limit information earns its place; the file-retention sentence does not.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

All six parameters are documented in the schema, and there is no output schema, so the description should ideally indicate what comes back (an interval count versus a resulting date) and how add/sub handles month-end overflow. Those return-shape and edge-case details are absent, leaving a moderate gap for a tool with multiple modes.

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%, so the enum values and the date2/number split are already documented in the schema. The description reinforces the mode distinction but adds no new semantics such as inclusive-date behavior, month-end clamping on add/sub, or accepted date formats beyond the schema.

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 first sentence states a specific capability pair: interval computation between two dates, and shifting a date by an amount. That is a clear verb-plus-resource statement an agent can act on. It falls short of 5 because it does not distinguish itself from nearby siblings such as due_date_calculator, business_days or time_calculator.

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

Usage Guidelines3/5

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

Usage is only implied through the two described modes ('between two dates' versus 'add/subtract ... to a date'), which the agent must map onto the mode parameter itself. There is no explicit guidance on when to prefer this over business_days for working-day counts or due_date_calculator for deadline math.

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