Skip to main content
Glama

legal_clause_extractor

Read-onlyIdempotent

Structured extraction of clauses, obligations and deadlines from legal documents (SaaS contracts, NDAs, employment agreements, loan agreements, leases, M&A deals, IP licences). Complements contract_risk_scanner with granular per-clause output.

ICP: legal ops, M&A lawyers, paralegals, contract managers, compliance officers.

Capabilities: • Auto-detects document type (7 types) and language (EN/FR/DE/ES/PT) • Extracts parties with roles (buyer, seller, licensor, employee, etc.) • Splits document into sections and classifies 16+ clause types • Per-clause: 20 obligation patterns (EN/FR/DE), 10 deadline patterns, 18 risk detectors • Document-level: red flags (liability cap, auto-renewal, IP overreach, etc.), missing clauses per doc type • Global deadline calendar with P0/P1/P2 severity • Cross-reference map between sections • Cache: 7 days (legal docs stable once provided)

100% pure compute — no external fetch required. Accepts 10k–100k char documents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoOptional. Language hint (e.g. 'en', 'fr', 'de'). Defaults to auto-detection.
asyncNoIf true, returns a job_id immediately (<200ms) instead of waiting for the result. Poll the result with job_result(job_id). Use for slow tools to avoid client timeouts.
document_textYesFull text of the legal document (10k–100k chars typical). Plain text or lightly HTML-formatted. EN/FR/DE/ES/PT supported.
document_typeNoOptional. Document type hint. Defaults to auto-detection. Use "auto" or omit to let the tool detect from content.
target_clausesNoOptional. Filter extraction to specific clause types. E.g. ["term", "termination", "liability", "ip", "confidentiality", "governing_law", "indemnification"]. If omitted or empty, all clauses are extracted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYes
sourcesYes
red_flagsYes
word_countYes
jurisdictionNo
governing_lawNo
lang_detectedYes
quality_scoreYes
effective_dateNo
cross_referencesYes
parties_detectedYes
clauses_extractedYes
key_deadlines_globalYes
document_type_detectedYes
missing_clauses_expectedYes

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint, idempotentHint, and no destructiveness. The description adds valuable behavioral context: pure compute (no external fetches), caching for 7 days, support for async processing, and input length constraints (10k-100k characters). These details go beyond what annotations provide.

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?

The description is well-structured with bullet points and clear sections, making it scannable. However, it is somewhat verbose, listing all document types, obligation patterns, etc. A bit more conciseness would improve score.

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 the tool's complexity (5 parameters, output schema exists), the description is exceptionally thorough. It covers input constraints, capabilities, cache behavior, and async support. The output schema likely details return structure, so the description appropriately focuses on behavioral aspects without redundancy.

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 baseline is 3. The description adds significant value by explaining how parameters work in practice: auto-detection of document type and language, filtering via target_clauses, and async behavior. It also elaborates on capabilities not captured in schema (e.g., extraction of parties, sections, obligation patterns).

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 clearly states the tool's purpose: structured extraction of clauses, obligations, and deadlines from legal documents. It distinguishes itself from the sibling tool 'contract_risk_scanner' by offering granular per-clause output, making the purpose specific and non-overlapping.

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 provides clear guidance on when to use the tool (for legal documents) and for whom (legal ops, M&A lawyers, etc.). It explicitly mentions complementing 'contract_risk_scanner' with granular output, implying an alternative. However, it does not explicitly state when not to use it or list all exclusions.

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.

TDQS

C2.8/5.0
Disambiguation2/5

Many tools have overlapping purposes, especially in competitive intelligence, ESG, and risk assessment. For example, there are multiple tools for competitor analysis (competitive_deep_dive, competitor_intel, competitor_moves, etc.) with unclear boundaries. Agents would struggle to select the correct tool without deep understanding of subtle differences.

Naming Consistency2/5

Tool names are a mix of English and French, and follow no consistent pattern. Some use snake_case (e.g., abm_architect, action_plan_esg), while others are verb-focused (e.g., content_catalog, fx_rate). The lack of a uniform naming convention makes it hard for agents to predict tool names.

Tool Count1/5

With 271 tools, the server is excessively large. Even for a broad knowledge domain, this number of tools makes discovery and selection inefficient. Typical coherent servers have 3-15 tools; this has an order of magnitude more, indicating poor scoping.

Completeness3/5

The tool set covers many domains (compliance, finance, marketing, HR, etc.), but the coverage is uneven due to redundancy. Key areas have multiple overlapping tools, while some sub-domains may still have gaps. Overall, the surface is broad but not well-curated.

Resources