Skip to main content
Glama

Date calculator, add time: add or subtract days, weeks, months or years to a date

date_add
Read-only

Add (or subtract, with negative numbers) years, months, weeks, days, hours and minutes to a date, or add business days (skipping Saturdays and Sundays). Month ends are clamped (31 Jan + 1 month = 28/29 Feb). Use to compute due dates and expiries. Example: date=2026-01-31. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
dateYesStart date or ISO timestamp
daysNoDays to add
hoursNoHours to add
weeksNoWeeks to add
yearsNoYears to add (negative subtracts)
monthsNoMonths to add
minutesNoMinutes to add
businessDaysNoWeekdays to add (skips weekends)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / hours
      Added value: +{
      +  "description": "Hours to add",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / minutes
      Added value: +{
      +  "description": "Minutes to add",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / weeks
      Added value: +{
      +  "description": "Weeks to add",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / years
      Added value: +{
      +  "description": "Years to add (negative subtracts)",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
  2. Added
  3. Removed
  4. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing month-end clamping semantics (31 Jan + 1 month = 28/29 Feb), that negative values subtract, weekend skipping for business days, and the billing model (first 25 free, failed calls free, repeats charged). This is substantive behavioral context the annotations do not carry.

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 capability statement is front-loaded and dense with useful detail, and the example is well-placed. The trailing pricing/credits sentences are necessary for cost-sensitive agents but slightly dilute the core message.

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?

For an 8-parameter computation tool with no output schema, the description covers units, edge-case semantics, an example, and cost, which is everything an agent needs to invoke it correctly.

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 parameters are already documented; the description adds real value on top by explaining negative-value subtraction and the month-end clamping rule that the schema never mentions. It does not explain unit-combination or precision behavior, keeping it just shy of a 5.

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?

Uses a specific verb (add/subtract) on a specific resource (date components) and enumerates the supported units, including the special businessDays mode. An agent can immediately distinguish it from date_diff or date_business_days siblings.

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?

States the intended use case ('compute due dates and expiries') and provides a concrete example, giving clear context for when to pick this tool. It stops short of explicitly naming the alternative sibling date_business_days or stating when not to use it.

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.