Skip to main content
Glama

Lordevo Shop (x402 website checks)

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

date_calc
Read-onlyIdempotent

$0.002 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

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description is free to add genuinely new context: the x402/USDC-on-Base pricing model, the free-trial mechanism via "trial": true or the try_free sibling, the offline/non-networked nature, and the supported year range 1000-9999. It stops short of describing result structure, but an output schema exists to carry that.

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?

One dense paragraph: pricing first, then purpose, then accepted inputs and limits. Front-loading the cost is a reasonable choice given it gates invocation, and there is little filler, though the pricing sentence competes with the capability statement for the opening position.

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?

For an eight-parameter pure-function tool with full schema coverage, annotations, and an output schema, the description supplies the missing operational context: offline execution, cost and trial path, and the year-range constraint. The only gap is conflict behavior among add/subtract/until, which the description leaves 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 baseline is 3 and the description only restates the parameter list (date, add, subtract, until, tz, weekend, holidays) at a high level. It does add the input-format shorthand and the 1000-9999 bound, but nothing about parameter interaction, e.g. what happens when both add and until are supplied.

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?

States specific verbs and resource: adds/subtracts durations and computes the difference to a second date, plus calendar metadata (weekday, ISO week, day of year, quarter). An agent can tell this is date arithmetic rather than pure timezone conversion, though it never names the nearest siblings (time_convert, cron_next) to draw a hard boundary.

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 by 'Date arithmetic offline' and by enumerating the optional add/subtract/until slots, so an agent can infer that supplying 'until' switches to difference mode. There is no explicit when-to-use statement and no routing away from look-alike tools such as time_convert or cron_next.

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