Skip to main content
Glama

Agent Data Tools: Utilities

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 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": {
      "date": "<date>"
    },
    "name": "date_add"
  }
}

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. Changed14 schema fields changed
    • changedInput schema / properties / businessDays / maximum
      Previous value: -9007199254740991New value: +100000
    • changedInput schema / properties / businessDays / minimum
      Previous value: --9007199254740991New value: +-100000
    • changedInput schema / properties / days / maximum
      Previous value: -9007199254740991New value: +100000
    • changedInput schema / properties / days / minimum
      Previous value: --9007199254740991New value: +-100000
    • changedInput schema / properties / hours / maximum
      Previous value: -9007199254740991New value: +100000
    • changedInput schema / properties / hours / minimum
      Previous value: --9007199254740991New value: +-100000
    • changedInput schema / properties / minutes / maximum
      Previous value: -9007199254740991New value: +100000
    • changedInput schema / properties / minutes / minimum
      Previous value: --9007199254740991New value: +-100000
    • changedInput schema / properties / months / maximum
      Previous value: -9007199254740991New value: +100000
    • changedInput schema / properties / months / minimum
      Previous value: --9007199254740991New value: +-100000
    • changedInput schema / properties / weeks / maximum
      Previous value: -9007199254740991New value: +100000
    • changedInput schema / properties / weeks / minimum
      Previous value: --9007199254740991New value: +-100000
    • changedInput schema / properties / years / maximum
      Previous value: -9007199254740991New value: +100000
    • changedInput schema / properties / years / minimum
      Previous value: --9007199254740991New value: +-100000
  2. 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"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint, idempotentHint=false) by disclosing the month-end clamping rule with a worked case (31 Jan + 1 month = 28/29 Feb), which is non-obvious and would surprise an agent. It also discloses the cost model — $0.01/call, first 10 free, failed calls free, repeats charged — which is critical context that the annotations cannot express.

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?

Front-loaded with the core operation and its clamping edge case before cost details, so the agent hits the important behavior first. Every sentence carries information, though the truncated example "date=2026-01-31" is less illustrative than it could be.

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

Completeness4/5

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

With no output schema, the description reasonably conveys that it computes rather than mutates and hints at the result via the clamping example, but never states the return format (a date string vs. timestamp). The interaction between businessDays and the other additive parameters is also left unaddressed for an eight-parameter 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 description coverage is 100%, so all eight parameters are already documented individually, and the baseline applies. The description adds only the global negation convention and the weekend-skipping note for businessDays, which the schema largely covers ("Weekdays to add (skips weekends)"). It says nothing about whether businessDays can be combined with days/months in a single call.

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 specific verb and resource set — add/subtract years, months, weeks, days, hours, minutes to a date — plus a business-day variant, which clearly distinguishes it from date_diff and date_business_days siblings. An agent can identify the tool without opening the schema.

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 a concrete usage context: "Use to compute due dates and expiries." It also clarifies the negation convention (negative numbers subtract), so directionality is not ambiguous. It stops short of naming when NOT to use it or routing to siblings like date_diff or date_business_days.

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