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: 25 calls/day per IP. Paid: $0.001 per 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.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered; the description adds genuinely new operational context: server-side execution, no data retention, a 25 calls/day free tier per IP, and per-call pricing. The only meaningful gap is that it never states what the response looks like (a number, a date string, both), which matters because there is no output schema.

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 core capability is front-loaded in the first sentence and the commercial/retention terms follow compactly. The 'files are deleted right after the call' clause is slightly off-key for a tool that takes no files, but it does not obstruct comprehension.

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?

With six parameters all documented in the schema, the description covers the remaining agent-relevant context of cost, quota and privacy. However, for a calculator with no output schema it should say what is returned (e.g. a count of units versus a resulting date), and it should distinguish the 'between' vs 'add'/'sub' branches more concretely for a mutation-free but mode-dependent tool.

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 coverage is 100% and both enums are documented inline, so the schema already carries the parameter burden. The description restates the supported units and the two operations but adds no semantics beyond the schema, such as whether number may be negative or how includeBoth changes the count, so the 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 both operations concretely: an interval between two dates (in days/weeks/months/years) and shifting a date by an amount, which lets an agent picture the tool's output shape without opening the schema. It does not differentiate from near neighbors like business_days or age_calculator, so an agent cannot tell which calendar tool to pick from the text alone.

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 implied through the two described operations, which map onto the 'between' and 'add/sub' modes, but there is no explicit when-to-use or when-not-to-use guidance. Nothing tells the agent to prefer business_days for working-day math or age_calculator for age-in-years, so selection among siblings is left to inference.

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