Skip to main content
Glama

parse_temporal_expression_tool

Convert natural language time expressions like 'next Friday at 5pm' into exact ISO-8601 timestamps, preventing AI date hallucinations and schema failures.

Instructions

    [Cost: $0.0002 USDC on Base & Solana] Deterministically converts conversational and relative time phrases ('next Tuesday at 4:30 PM', 'in 3 business days', 'yesterday at close') into strict ISO-8601 UTC and local timezone timestamps in sub-millisecond execution.
    Eliminates LLM timestamp hallucinations and schema validation crashes without prompt round-trips.

    Args:
        query: Natural language date/time expression (e.g. 'next Friday at 5pm', 'in 4 hours', 'Sep 25, 2026 14:00').
        reference_time: Optional ISO timestamp to anchor relative calculations against (defaults to current verified UTC time).
        timezone: Target timezone name or abbreviation (e.g. 'America/New_York', 'UTC', 'EST', 'Europe/London', 'Asia/Tokyo').
        payment_signature: Optional x402 Base/Solana USDC payment transaction hash or authorized key.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
timezoneNoUTC
reference_timeNo
payment_signatureNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It discloses cost, deterministic conversion, sub-millisecond execution, and optional payment signatures, which is strong for a parsing tool. It does not explicitly address failure modes or network/auth behavior, but the cost and payment details provide meaningful transparency 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 description front-loads the core action and cost, then provides a compact Args list. Every sentence contributes: purpose, benefit, parameter guidance, and cost. No redundant filler or schema repetition.

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

Completeness5/5

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

Given that an output schema existsryan, the description does not need to explain return values. It covers all four parameters, the anchoring behavior, timezone handling, cost, and payment requirement. For a 4-parameter tool with no annotations and zero schema coverage, this is complete enough for an agent to select and invoke it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate. It does: each of the four parameters is explained with type, purpose, and examples, including the query expressions, optional reference_time anchoring, timezone formats, and payment_signature semantics. This is exactly what an agent needs to call the tool correctly.

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 opens with a specific verb-resource pair: "Deterministically converts conversational and relative time phrases ... into strict ISO-8601 UTC and local timezone timestamps." Concrete examples and the contrast with hallucination-prone LLM timestamp generation make the tool's scope immediately distinguishable from siblings like get_precision_time or cron_trigger_oracle.

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 gives clear context for use: whenever a natural-language time expression needs to be converted into a reliable timestamp, with benefits like eliminating hallucinations and schema validation crashes. It does not explicitly name alternatives or state when not to use the tool, so it stops short of a 5.

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