Skip to main content
Glama

Extract all dates from text

extract_dates
Read-only

Find every date/time mention in a text (max 4 KB) and return each with its character index, matched text and resolved ISO timestamps (start and optional end of ranges).

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": {
      "text": "<text>"
    },
    "name": "extract_dates"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
localeNoLanguage of the text. en reads 03/04 as March 4; en-GB as 3 April. Default en.
timezoneNoIANA time zone for reading and reporting local times, e.g. "America/Denver". Default UTC.
referenceNoISO 8601 date or date-time that relative phrases are resolved against (e.g. "2026-11-11T09:00:00-07:00"). Default: current server time.
max_resultsNoStop after this many dates (default 20, max 25); truncated is true when more were found (truncated_reason "max_results"), or when the scan stopped early in number-dense text after roughly 600 numbers (truncated_reason "number_budget": later dates were not read; send the rest separately).
forward_dateNoAlways pick the future reading of phrases like "Friday" or "October 5". Default false (closest reading).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world), and the description adds genuinely new behavior: a hard 4 KB input ceiling and the exact shape of each result item, including that ranges return a start and optional end. The 'max 4 KB' constraint is the key operational fact an agent needs and it appears nowhere in the annotations.

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?

A single front-loaded sentence that packs purpose, size limit, and return fields with no filler. It is dense to the point of being slightly overloaded by the trailing parenthetical about range ends, but nothing is wasted.

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

Completeness4/5

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

With no output schema, the description usefully summarizes the return fields (index, matched text, ISO times, optional end), and the input bound is stated. What is left implicit — truncation semantics, defaults and locale-driven ambiguity — is fully documented in the 83%-covered schema, so the definition is adequate overall.

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 83%, so the schema already explains locale disambiguation (en vs en-GB), timezone, reference resolution and max_results truncation reasons. The description repeats none of that and only contributes the non-parameter 4 KB input limit, so it adds little meaning beyond the structured fields.

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 gives a specific verb and resource ('Find every date/time mention in a text') plus the return shape (character index, matched text, ISO timestamps with optional range end) and an input bound (max 4 KB). It does not contrast itself with siblings like resolve_date or normalize_timestamps, so an agent must infer that this is the multi-date extraction tool rather than the single-date resolver.

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

Usage Guidelines3/5

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

Usage is only implied by the verb 'Find every ... in a text' and the 4 KB size note. There is no explicit statement of when to prefer this over resolve_date, nor any note about splitting large documents into chunks beyond the implicit size limit.

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.

Resources