Skip to main content
Glama

Lordevo Shop: website checks for agents (x402)

Date calculator: add durations, business days, difference between dates ($0.0021/call)

date_calc
Read-onlyIdempotent

$0.0021 per call (x402, USDC on Base; free trial: add "trial": true or use try_free). [Data utilities] Date arithmetic offline: adds or subtracts durations (ISO 8601 or plain text, including business days with your weekend and holiday list), and gives the difference to a second date in calendar days, weeks, years/months/days and business days, plus weekday, ISO week, day of year and quarter. Input: date (YYYY-MM-DD, ISO date-time, Unix seconds, today or now), optional add, subtract, until, tz, weekend, holidays. Years 1000-9999.

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_calc"
  }
}

Input Schema

NameRequiredDescriptionDefault
tzNoIANA time zone for today/now and local times (default UTC)
addNoDuration to add: ISO 8601 (P1M2D, PT4H) or text (3 days, -2 weeks, 10 business days, 4h 30m; m = minutes, mo = months)
dateYesDate: YYYY-MM-DD, ISO 8601 date-time (2026-11-01T09:30, optional Z or +08:00), Unix seconds, today or now
trialNoOptional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms.
untilNoSecond date: returns the difference in days, weeks, years/months/days and business days
weekendNoWeekend days for business-day math, e.g. sat,sun (default), fri,sat, sun or none
holidaysNoDates to skip as holidays in business-day math: up to 400 YYYY-MM-DD, comma-separated
subtractNoDuration to subtract (same formats as add)

Output Schema

NameRequiredDescriptionDefault
toolNo
cacheNo
inputNo
notesNo
startNo
_trialNoPresent when the call was a free trial call.
resultNo
appliedNo
providerNo
timezoneNo
price_usdNo
differenceNo
business_rulesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / trial / description
      Previous value: -"Optional. true = answer free if a trial call is left (3 per IP per UTC day); otherwise you get the payment terms."New value: +"Optional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms."
  2. Changed2 schema fields changed
    • addedInput schema / properties / trial
      Added value: +{
      +  "description": "Optional. true = answer free if a trial call is left (3 per IP per UTC day); otherwise you get the payment terms.",
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "required": [
      +        "tool",
      +        "timezone",
      +        "start"
      +      ]
      +    },
      +    {
      +      "properties": {
      +        "accepts": {
      +          "type": "array"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "resource": {
      +          "type": "object"
      +        },
      +        "x402Version": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "x402Version",
      +        "accepts"
      +      ]
      +    },
      +    {
      +      "properties": {
      +        "charged": {
      +          "type": "boolean"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "error"
      +      ]
      +    }
      +  ],
      +  "properties": {
      +    "_trial": {
      +      "description": "Present when the call was a free trial call.",
      +      "type": "object"
      +    },
      +    "applied": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "business_rules": {
      +      "type": "object"
      +    },
      +    "cache": {
      +      "type": "object"
      +    },
      +    "difference": {
      +      "properties": {
      +        "business_days": {
      +          "type": "integer"
      +        },
      +        "calendar_days": {
      +          "type": "integer"
      +        },
      +        "days": {
      +          "type": "integer"
      +        },
      +        "direction": {
      +          "enum": [
      +            "future",
      +            "past",
      +            "same"
      +          ],
      +          "type": "string"
      +        },
      +        "months": {
      +          "type": "integer"
      +        },
      +        "total_seconds": {
      +          "type": "integer"
      +        },
      +        "years": {
      +          "type": "integer"
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "input": {
      +      "type": "object"
      +    },
      +    "notes": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "price_usd": {
      +      "type": "number"
      +    },
      +    "provider": {
      +      "type": "string"
      +    },
      +    "result": {
      +      "properties": {
      +        "date": {
      +          "type": "string"
      +        },
      +        "datetime": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "day_of_year": {
      +          "type": "integer"
      +        },
      +        "days_in_month": {
      +          "type": "integer"
      +        },
      +        "is_business_day": {
      +          "type": "boolean"
      +        },
      +        "is_leap_year": {
      +          "type": "boolean"
      +        },
      +        "is_weekend": {
      +          "type": "boolean"
      +        },
      +        "iso_week": {
      +          "type": "string"
      +        },
      +        "quarter": {
      +          "type": "integer"
      +        },
      +        "unix_seconds": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "utc": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "weekday": {
      +          "type": "string"
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "start": {
      +      "properties": {
      +        "date": {
      +          "type": "string"
      +        },
      +        "datetime": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "day_of_year": {
      +          "type": "integer"
      +        },
      +        "days_in_month": {
      +          "type": "integer"
      +        },
      +        "is_business_day": {
      +          "type": "boolean"
      +        },
      +        "is_leap_year": {
      +          "type": "boolean"
      +        },
      +        "is_weekend": {
      +          "type": "boolean"
      +        },
      +        "iso_week": {
      +          "type": "string"
      +        },
      +        "quarter": {
      +          "type": "integer"
      +        },
      +        "unix_seconds": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "utc": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "weekday": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "timezone": {
      +      "type": "string"
      +    },
      +    "tool": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), and the description adds real behavior beyond them: the computation is offline, supported years are 1000-9999, timezone defaults to UTC, business-day math uses a caller-supplied weekend/holiday list, and calls are metered at $0.0021 with a 3-per-IP-per-day trial path via try_free. No contradiction with the read-only hints. It stops short of describing error behavior for unparseable dates or elapsed-time/pagination concerns, which do not apply here.

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?

Capabilities are front-loaded and the prose is dense, but the leading pricing sentence duplicates the title and precedes the actual purpose, and the closing 'Input: ...' enumeration re-lists eight parameters already fully described in the schema. That tail is filler for an agent that can read structured fields.

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 an output schema present, the description need not explain return shapes, yet it still names the difference units returned, which helps routing. Combined with format coverage, timezone default, and year bounds, an agent has enough to invoke it correctly; only invalid-input handling is left unstated.

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 schema already documents tz, add, date formats, until, weekend, holidays, and trial. The description restates that same input list at a summary level without adding format nuance or constraints the schema lacks (e.g. relative precedence of add vs subtract vs until). Baseline 3 applies when the schema carries the detail.

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 capability set with verbs and resources: adds/subtracts durations (including business days) and returns the difference to a second date in multiple units. The enumerated outputs (weekday, ISO week, day of year, quarter) make the tool unmistakable relative to siblings like math_eval or cron_next.

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?

Clear context for when it applies: offline date arithmetic, with the add/subtract/until parameters implicitly signaling the three usage modes (shift a date, shift it back, diff two dates). It does not state exclusions or point to any alternative for pure numeric math, but no obvious confusion arises.

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