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
Behavior5/5

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

The description adds significant behavioral details beyond the annotations (readOnlyHint, idempotentHint, destructiveHint): it declares '100% pure compute — no external fetch required', describes auto-detection of document type and language, caching behavior (7 days), and input size constraints (10k–100k chars). These details align with and augment 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?

The description is well-structured with bullet points for capabilities and is front-loaded with the main purpose. While comprehensive, it is slightly verbose (e.g., listing 7 document types explicitly), but every sentence serves a purpose and contributes to clarity.

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 complexity of the tool and the presence of an output schema, the description covers all necessary aspects: input requirements, capabilities, caching, compute nature, and use case. It is complete and provides sufficient context for an agent to understand the tool's behavior and constraints.

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?

The input schema has 100% description coverage for all parameters, so the baseline is 3. The description provides additional context (e.g., typical input size, supported languages) but does not add per-parameter details beyond what is already in the schema. It does not compensate with new parameter-level semantics.

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' and lists specific document types. It distinguishes itself from the sibling tool 'contract_risk_scanner' by noting it provides 'granular per-clause output', making the differentiation explicit.

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 identifies the Ideal Customer Profile (legal ops, M&A lawyers, etc.) and explains when to use this tool versus contract_risk_scanner. However, it does not explicitly state when NOT to use it or list alternative tools beyond the one mentioned, which would provide stronger guidance.

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.5/5.0
Disambiguation2/5

With 271 tools, many have overlapping purposes (e.g., multiple competitor intel tools, multiple financial modelers, multiple ESG auditors). Detailed descriptions help slightly, but the sheer volume creates confusion. Agents would struggle to select the right tool among many similar options.

Naming Consistency1/5

Tool names are wildly inconsistent: mix of English and French, snake_case and short phrases, some very generic (process, run, execute equivalents). No discernible naming convention (e.g., abm_architect vs. boundary_control vs. bp_narratif). This makes it hard to predict tool names.

Tool Count1/5

271 tools is far beyond typical well-scoped servers (3-15). This indicates an unfocused, over-bloated tool surface. Even for a general business intelligence server, this number is excessive and violates the principle of each tool earning its place.

Completeness2/5

Despite the large count, coverage feels scattered. Some domains (e.g., content, competitive intel) have many tools, while others (e.g., supply chain, HR) have gaps. The set lacks a coherent scope; it seems like a dump of many separate tool collections rather than a complete, curated surface.

Resources