Skip to main content
Glama

time_date_math

Read-only

Date calculator — Add or subtract days, weeks, months, years or hours from a date, or measure the gap between two dates (days, weeks, calendar breakdown, weekdays). Also returns weekday, ISO week, day of year and quarter. Pass ?date=, then ?add= or ?to=. Price: $0.001 USDC (Base, via x402).

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": {
      "add": "<add>",
      "to": "<to>"
    },
    "name": "time_date_math"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYessecond date to measure the gap to
addYese.g. 90d, 3w, 6m, 1y, -2d (comma-separate to combine)
dateNostart date YYYY-MM-DD, default today

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds genuinely non-redundant behavior: the shape of the returned data (weekday, ISO week, day of year, quarter, calendar breakdown, weekdays) and, importantly, the paid-access requirement ('$0.001 USDC (Base, via x402)') plus the query-parameter calling convention. That payment/auth disclosure is exactly the kind of context 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?

The definition is a single dense, front-loaded block: capability first, outputs second, invocation third, price last. Nearly every clause carries information. It loses a point only because the trading off of 'add' vs 'to' is stated so tersely that it becomes confusing rather than efficient.

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?

With no output schema, the description correctly compensates by enumerating return fields, and it discloses the x402 payment requirement — both appropriate for a read-only calculator. However, it leaves the required-parameter conflict unresolved and gives no detail on how negative or combined durations (',-comma-separated') behave, which matters for a tool whose only inputs are duration strings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all three parameters, which sets a baseline of 3. The description instead introduces a discrepancy: it says 'Pass ?date=, then ?add= or ?to=', implying the two modes are alternatives, while the schema marks both 'add' and 'to' as required. It also advertises 'hours' support with no syntax example, whereas the schema's 'add' examples cover only d/w/m/y. This ambiguity risks malformed calls rather than adding clarity.

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?

The description names a specific verb+resource pair up front ('Date calculator') and enumerates the two core operations: adding/subtracting durations and measuring a gap between dates. It also lists the derived outputs (weekday, ISO week, day of year, quarter), so an agent knows exactly what class of tool this is. It does not explicitly distinguish itself from the sibling 'time_business_days' or 'time_convert', even though the 'weekdays' mention brushes against them, so it stops short of a 5.

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?

'Add or subtract ... from a date, or measure the gap between two dates' implies the two usage modes, which is more than nothing. But there is no explicit when-to-use / when-not guidance and no pointer to sibling tools for related needs like business-day counting or timezone conversion. The invocation hint 'Pass ?date=, then ?add= or ?to=' is parameter mechanics rather than routing guidance.

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