Skip to main content
Glama
omarnagy91
by omarnagy91

extract_dates

Extract all dates from legal contracts, classify each date's role (e.g., term end, notice), and compute deadlines from notice periods. Supports Gregorian and Hijri calendars with Arabic-Indic and Persian digits.

Instructions

Extract every date, classify what it is for, and compute the deadlines that follow from it. Handles Gregorian and Hijri, Arabic-Indic and Persian digits, and month names in the Egyptian and Gulf, Levantine and Iraqi, and Hijri naming traditions. Each date reports its calendar, an ISO value, the role it plays (execution, commencement, term_end, renewal, notice, payment, delivery, signature) and the wording that justified that role. Hijri dates are converted with the tabular civil calendar and labelled as such, and where the contract states its own Gregorian equivalent any divergence is reported rather than resolved. Also returns notice periods found in the text and, where a fixed date anchors them, computed deadlines such as the date by which notice of non-renewal must be given.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the document. Accepts .pdf, .docx or a plain text file (.txt, .md). Absolute paths are safest. The format is detected from the file content, not the extension.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and excels: it discloses the Hijri conversion method ('tabular civil calendar and labelled as such'), the divergence policy ('reported rather than resolved' when the contract states its own Gregorian equivalent), and the exact result shape (calendar, ISO value, role, justifying wording, notice periods, computed deadlines). This is precisely the behavioral context an agent needs beyond any structured metadata.

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?

Front-loaded with the core function, then layered into supported formats, output structure, conversion policy, and derived results. Every sentence carries unique information and the density is justified by the tool's complexity, though the enumeration of role values and naming traditions is slightly long.

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?

There is no output schema, so the description must explain return values — it does so thoroughly: each date reports calendar, ISO value, role, and justifying wording, plus notice periods and deadlines anchored to fixed dates. For a multi-calendar, multi-dialect tool, nothing an agent needs to invoke it correctly or interpret its output is missing.

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 description coverage is 100%: the single 'path' parameter is fully documented in the schema, including accepted extensions, the absolute-path recommendation, and content-based format detection. The description adds no parameter-specific detail, which is acceptable at the baseline of 3 for full schema coverage.

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 ('Extract every date') and immediately adds what distinguishes this tool: classification of each date's role and computation of follow-on deadlines. No sibling (load_document, extract_parties, find_clauses, segment_clauses, document_summary) overlaps with date extraction, so an agent can tell them apart without opening any schemas.

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 scope is so clearly delineated — date extraction across calendars, digit systems, and regional month-name traditions, plus notice periods and deadlines — that the context for when to use it is unmistakable. However, it never explicitly states 'use this when you need dates/deadlines' nor names alternatives or exclusion conditions, leaving routing slightly implicit.

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

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/omarnagy91/legal-intake-mcp'

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