Skip to main content
Glama

datetime_diff

Calculate the difference between two dates or times. Input start and end dates to get the duration between them.

Instructions

Calculate the difference between two dates/times

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesEnd date (ISO 8601 or common formats)
fromYesStart date (ISO 8601 or common formats)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states 'calculate the difference' without detailing timezone handling, input validation behavior, error cases, or the exact return format. For a computation tool, this lacks the transparency needed to anticipate unexpected behavior.

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 a single concise sentence that immediately conveys the tool's purpose. It is front-loaded with the verb and resource, contains no fluff, and every word earns its place.

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

Completeness2/5

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

This simple tool has no output schema, so the description should explain what the difference looks like (e.g., units, format). It does not, leaving the agent to guess whether the result is in seconds, days, or a human-readable string. The two parameters are well-defined in the schema, but the missing return-value documentation makes the description incomplete for an agent to confidently use the tool.

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?

The schema already describes both parameters ('from' and 'to') with 100% coverage, so the description does not need to add much. It does say 'between two dates/times', which aligns with the parameters but adds no new semantic detail beyond the schema. Baseline 3 is appropriate.

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 clearly states the action ('calculate') and the resource ('difference between two dates/times'), which is specific and unambiguous. It naturally distinguishes itself from sibling tools like datetime_now by focusing on the subtraction operation, so the agent knows exactly what the tool is for.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention any exclusions, prerequisites, or alternative tools, leaving the agent to infer usage solely from the name and description. This is a clear gap given the many sibling tools.

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/RockaRhymeLLC/bmobot-mcp'

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