Skip to main content
Glama

Compute a duration

compute_duration
Read-onlyIdempotent

Exact duration between two ISO 8601 date-times, in seconds, minutes, hours and days, with a breakdown.

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": {
      "start": "<start>",
      "end": "<end>"
    },
    "name": "compute_duration"
  }
}

Input Schema

NameRequiredDescriptionDefault
endYesEnd date-time (ISO 8601).
startYesStart date-time (ISO 8601).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered structurally. The description adds the return shape (seconds, minutes, hours, days, with breakdown), which is genuinely useful because there is no output schema. It does not disclose how negative durations or timezone offsets are handled.

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?

A single front-loaded sentence naming inputs and outputs with no waste. The trailing 'with a breakdown' is mildly redundant with the preceding unit list, but the whole is 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?

For a simple two-parameter read-only tool, the description plus annotations cover most of what an agent needs, including the return units. It leaves real gaps for a calculation tool, though: ordering assumptions (start > end), timezone/offset handling, and precision rounding are 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 coverage is 100%, with both start and end documented as ISO 8601 date-times in the schema itself, so the description only needs to not contradict it, which it doesn't. It adds no extra meaning such as whether start must precede end, or how mixed timezone offsets are resolved.

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 a specific verb (compute) and resource (duration between two ISO 8601 date-times), plus the units returned. It is clearly distinguishable from generic siblings like convert_time or get_current_time by naming its exact inputs, though it does not explicitly contrast itself with convert_time.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No when-to-use guidance is given: nothing says to prefer this over convert_time or get_current_time, and no prerequisites or exclusions are stated. Usage is only implied by the stated purpose.

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.