Skip to main content
Glama

Date math

date_math

Add or subtract days, hours, or business days (Monday to Friday, holidays not skipped), or diff two dates. Intl and UTC calendar dates only.

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

Input Schema

NameRequiredDescriptionDefault
dateYesYYYY-MM-DD or an ISO timestamp.
diffNoSecond date. Returns days, hours, and business days between them.
add_daysNo
add_hoursNo
subtract_daysNo
subtract_hoursNo
add_business_daysNo
subtract_business_daysNo

Output Schema

NameRequiredDescriptionDefault
okNo
diffNo
resultNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose two genuinely useful behaviors: business days mean Monday–Friday and holidays are NOT skipped, and only Intl/UTC calendar dates are supported. It stops short of stating whether the arithmetic modifiers are mutually exclusive or combinable in one call, or what happens on invalid input.

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?

Two tight sentences with the capability list front-loaded and the constraint trailing — no filler. The compactness edges toward under-specification given eight parameters, but nothing in it is wasted.

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?

The output schema covers return values and the description covers the business-day and calendar-date quirks, so it is not inadequate. But for an eight-parameter tool with no annotations, the definition omits the operation-combination rule and error behavior, which an agent needs in order to build a correct call.

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 only 25% — the six add_/subtract_ modifiers are undocumented in the schema. The description compensates partially by defining what a 'business day' means and that days/hours/business days are the three units, but it never clarifies the meaning of choosing add_days versus subtract_days versus add_hours, nor whether they compose. That leaves several of the eight parameters semantically ambiguous.

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?

The description gives specific verbs (add, subtract, diff) against a specific resource (calendar dates) and enumerates the supported units: days, hours, and business days. Combined with the Intl/UTC scope note, an agent can tell this apart from siblings like time_convert or holidays 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the capability list; there is no explicit 'use this when X, use Y instead' routing. The parenthetical 'holidays not skipped' hints that a holidays-aware path exists elsewhere, but the definition never names an alternative or a when-not-to-use condition.

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