Skip to main content
Glama

temporal-mcp-server

add_duration

Add an ISO-8601 duration to a timestamp, in a timezone. Date units (Y/M/D) are calendar-aware: P1D across a DST boundary keeps the same wall-clock time the next day, and P1M on Jan 31 clamps to the end of February. Time units (H/M/S) are exact elapsed time, so PT24H really is 24 hours. Prefix the duration with '-' to subtract.

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": {
      "duration": "<duration>",
      "isoTimestamp": "<isoTimestamp>"
    },
    "name": "add_duration"
  }
}

Input Schema

NameRequiredDescriptionDefault
durationYesISO-8601 duration, e.g. 'P1D', 'PT30M', 'P1Y2M3DT4H5M6S', or '-P1W'.
timezoneNoIANA timezone governing the arithmetic — calendar units are applied to this zone's wall clock, and a timestamp with no 'Z' or offset is read as wall-clock time here. Defaults to UTC.
isoTimestampYesISO-8601 timestamp to shift.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does substantial work: it discloses that Y/M/D units are calendar-aware with DST wall-clock preservation and end-of-month clamping (P1M on Jan 31 → end of February), while H/M/S are exact elapsed time. Gaps remain — nothing about errors on malformed durations or nonexistent wall-clock times in a DST spring-forward gap, and nothing about the return value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with the core action, then the two behavioral rules an agent most needs, then the subtraction syntax. The DST and Jan-31 examples are concrete and each earns its space; there is no filler.

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 tool has no output schema and no annotations, so the description must also convey the result. It never says what comes back — an ISO-8601 string, in which zone/offset, whether the input's offset is preserved — which leaves a real gap for a pure-computation tool whose only value is its return value.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, and the description adds genuine meaning on top: the '-' prefix rule for the duration parameter and the calendar-vs-exact distinction that determines how that same string is interpreted. The timezone parameter's wall-clock governance is largely a restatement of its schema text, which keeps this from a 5.

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 opens with a specific verb and resource: 'Add an ISO-8601 duration to a timestamp, in a timezone.' That scope is distinct from every sibling (convert_timezone, get_current_time, time_between) — none of them perform duration arithmetic — so an agent can route without opening a 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 semantics are implied rather than routed: the description explains how arithmetic behaves and how to subtract ('Prefix the duration with "-"'), but never states when to prefer this tool over convert_timezone or time_between, nor any precondition (e.g., valid IANA zone required). An agent can infer the use case, but there is no explicit when/when-not 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.