Skip to main content
Glama

calculate

Timezone-aware date arithmetic: add or subtract a duration to a datetime (days are calendar-based and DST-safe; hours and minutes are absolute), or compute the difference between two datetimes that may be in different zones.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datetimeYesBase datetime: ISO 8601 or natural language.
timezoneYesIANA timezone the base datetime is in.
operationYesWhat to compute: { type:'add', amount, unit } to add/subtract a duration, or { type:'diff', to_datetime, to_timezone? } for the difference between two datetimes.

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?

With no annotations present, the description carries the full burden of behavioral disclosure, and it does this well by explaining key nuances: days are calendar-based and DST-safe while hours and minutes are absolute, and diff supports datetimes in different zones. It does not describe the return format or edge-case behavior, but the stated semantics go meaningfully beyond the schema.

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 entire description is one well-structured sentence with no filler. The primary purpose is front-loaded, and the parenthetical packs important behavioral nuance without bloating the text. Every phrase contributes to understanding how the tool behaves.

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?

The schema covers parameters thoroughly, and the description adds important behavior semantics, but there is no output schema and the description does not disclose what the result looks like (e.g., a formatted datetime string or a duration object). For a tool with conditional nested parameters and no annotations, this is a notable gap, though the core behavior is clear.

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 description coverage is 100%, so the baseline is 3. The description adds value by clarifying the semantic meaning of units—DST-safe days versus absolute hours/minutes—and by noting that diff can operate across different timezones. This complements rather than repeats 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 clearly identifies the tool as timezone-aware date arithmetic with two specific operations: add/subtract a duration and compute a difference between datetimes. This is more specific than the bare name 'calculate' and distinguishes it from most siblings, though it does not explicitly name a sibling like 'offset' to contrast with.

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 explains what the tool does rather than when to prefer it over alternatives. There is no explicit 'use this when' guidance or comparison with sibling tools such as 'now', 'offset', or 'timezones'. The timezone-aware framing implies a relevant use case, but the agent is left to infer selection criteria.

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.