Skip to main content
Glama

time_math

Read-onlyIdempotent

Performs compound time calculations, including adding days or business days, date differences, time zone conversion, natural-language parsing, and duration formatting for multi-step scheduling tasks.

Instructions

Performs compound time-math operations. Dispatches to the appropriate sub-operation based on the 'operation' parameter. Operations: add_days, add_business_days, diff, convert_tz, parse_nl, format_duration. Use this for multi-step or dynamic time operations; for single-purpose calls use get_current_time, convert_timezone, parse_duration, add_business_days, or count_business_days.

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": {
      "operation": "<operation>",
      "operands": "<operands>"
    },
    "name": "time_math"
  }
}

Input Schema

NameRequiredDescriptionDefault
operandsYesKey-value pairs matching the chosen operation's expected fields. See operation documentation for required keys.
operationYesThe time arithmetic operation to perform. Each operation expects specific operands.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / operands / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful dispatch context — the tool's behavior branches on 'operation' — but it does not describe what any individual operation does (e.g. what parse_nl accepts or what shape diff returns). That branching behavior is the key thing an agent would want disclosed.

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?

Three tight sentences: purpose, dispatch mechanism, operation list, then routing. Front-loaded and free of filler. The operation enumeration partly duplicates the schema enum, which is a small redundancy but aids scanability.

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 dispatcher tool whose second parameter is an unconstrained key-value bag, the description should carry the per-operation operand contract; here it explicitly punts to external 'operation documentation.' No output schema exists, so the absence of any statement about return shape (especially for diff or format_duration) is a further gap, though the routing guidance is solid.

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%, so the enum of operations and the 'operands' description are already in structured form; the description largely restates the enum. It does not explain what keys 'operands' requires per operation — the schema itself is an untyped free-form object — and instead defers with 'See operation documentation for required keys,' pointing at material not present.

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 names a specific verb and resource ('compound time-math operations') and enumerates the six concrete operations (add_days, add_business_days, diff, convert_tz, parse_nl, format_duration), so an agent knows exactly what surface it covers. It also distinguishes itself from the single-purpose siblings, though the leading phrase 'compound' is a bit abstract until the operation list clarifies it.

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

Usage Guidelines5/5

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

Explicit routing rule: use this tool for multi-step or dynamic time operations, and use named alternatives (get_current_time, convert_timezone, parse_duration, add_business_days, count_business_days) for single-purpose calls. Both the when and the when-not conditions are stated with the alternatives named.

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