Skip to main content
Glama

Time Calculator API - add/subtract durations or calculate time between two timestamps

time_calculator
Read-onlyIdempotent

Add or subtract durations (1:30:00, 2h 15m, -45 min, 1d 3h) optionally onto a clock time, or compute the exact elapsed duration between two clock times or ISO datetimes (handles overnight shifts). Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/call via x402 at https://radarbg.com/x402/time-calculator.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "add",
      "clockTime": "08:30",
      "durations": "1:30:00\n2h 15m\n-45 min"
    },
    "name": "time_calculator"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoEnd time or datetime (mode=diff), e.g. 17:45 or 2026-11-21 06:30
modeNoadd (sum/subtract durations) or diff (time between start and end)add
startNoStart time or datetime (mode=diff), e.g. 08:30 or 2026-11-20 22:00
clockTimeNoOptional clock time to add the sum onto (mode=add), e.g. 08:30
durationsNoDurations, newline-separated or JSON array (for mode=add), e.g. 1:30:00\n2h 15m\n-45 min

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint, idempotentHint, openWorldHint), the description discloses genuinely useful operational facts: server-side execution, no data retention, a 5-calls/day per-IP free tier, and the two auth paths (X-API-Key vs. x402 per-call billing). The 'files are deleted right after the call' sentence is noise since no file parameters exist, and return format is unstated, keeping it from a 5.

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 core capability is front-loaded in the first sentence with illustrative formats, and each subsequent sentence covers a distinct concern (execution/privacy, then access tiers). It is slightly padded by two promotional URLs and a file-deletion claim irrelevant to a schema with no file inputs.

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?

Five optional parameters with a defaulted enum are well covered by the schema and the description handles inputs and access mechanics. The notable gap is behavior on success: with no output schema, the description never says what comes back (e.g., a normalized duration string plus seconds), which matters for a dual-mode calculator.

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 regardless of description. The description adds only marginal meaning beyond the schema — the accepted duration notation set (including '1d 3h' and negative values) and the fact that clockTime is optional — while start/end/mode semantics are already fully documented in the schema.

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 states specific operations with concrete input formats: adding/subtracting newline-separated durations, optionally onto a clock time, or computing elapsed time between two clock times/ISO datetimes. It even names a distinguishing edge case (overnight shifts). It does not, however, differentiate itself from plausible siblings such as hours_calculator or date_calculator, 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?

Usage is implied rather than stated: the two operations map to mode=add vs. mode=diff, and 'optionally onto a clock time' signals when clockTime applies. There is no explicit when-to-use/when-not guidance and no named alternative for overlapping tools like date_calculator or hours_calculator, so an agent must infer routing.

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