Skip to main content
Glama

Time Difference Calculator

calculator_time_difference
Read-only

Difference between two times (HH:MM[:SS] or AM/PM). Default overnight when end < start.

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_time": "<start_time>",
      "end_time": "<end_time>"
    },
    "name": "calculator_time_difference"
  }
}

Input Schema

NameRequiredDescriptionDefault
end_timeYesEnd time.
overnightNoIf true (default), end < start crosses midnight.
start_timeYesStart time.

Output Schema

NameRequiredDescriptionDefault
resultNo
expressionYes
total_secondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already establish this as a safe read-only operation, and the description adds the accepted time formats plus the default overnight interpretation. It does not explain result sign, rounding, or how non-overnight end<start is handled, so additional behavioral context is limited.

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?

Two short sentences, front-loaded with the core operation and followed by the key default behavior. Every sentence carries information and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple calculator with full schema coverage, annotations, and an output schema, the description covers the essential inputs and the overnight rule. It leaves some differentiation from time/date sibling tools implicit, preventing a 5.

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 already 100%, so the baseline is 3. The description adds useful format syntax ('HH:MM[:SS] or AM/PM') beyond the terse schema property descriptions, and it reinforces the default overnight parameter semantics.

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 operation ('Difference') on a specific resource ('two times') and lists accepted formats. It is distinguishable from date-oriented siblings by the explicit focus on times, but it does not name the closest sibling alternatives.

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?

The overnight default implies when cross-midnight behavior applies, but the description gives no explicit guidance on when to choose this tool over calculator_date_difference, calculator_time, or calculator_days.

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.