Skip to main content
Glama

time_diff

Calculate time differences between two dates in various units. Specify start and optional end times to get results in seconds, minutes, hours, days, or weeks.

Instructions

Calculate time difference between two dates. Defaults to now if end omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startYesStart time
endNoEnd time (default: now)
unitNoOutput unit
Behavior3/5

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

No annotations are provided, so the description carries full burden. It mentions the default behavior for 'end' parameter, which is useful. However, it doesn't disclose other behavioral traits like input date format requirements, timezone handling, error conditions, or output format details. The description is functional but lacks depth for a mutation-free calculation tool.

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?

The description is perfectly concise: two short sentences that communicate essential information with zero waste. It's front-loaded with the core purpose, followed by an important usage note. Every word earns its place.

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 calculation tool with 100% schema coverage but no output schema, the description is minimally adequate. It covers the basic operation and a key default, but doesn't address output format, precision, or edge cases. Given the tool's moderate complexity (date/time calculations can be nuanced), the description could benefit from more context about what the calculation returns.

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 schema already documents all three parameters thoroughly. The description adds marginal value by reinforcing the default for 'end' parameter, but doesn't provide additional semantic context beyond what's in the schema (e.g., date format examples, timezone considerations). Baseline 3 is appropriate when schema does the heavy lifting.

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 clearly states the tool's purpose: 'Calculate time difference between two dates.' It specifies the verb ('calculate') and resource ('time difference'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'time_convert' or 'time_current', which prevents a perfect score.

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

Usage Guidelines4/5

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

The description provides clear context for usage: 'Defaults to now if end omitted.' This tells the agent when to omit the 'end' parameter. However, it doesn't explicitly mention when to use this tool versus alternatives like 'time_convert' for other time operations, or provide exclusions for invalid date formats.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ShunsukeHayashi/miyabi-mcp-bundle'

If you have feedback or need assistance with the MCP directory API, please join our Discord server