Skip to main content
Glama
omarnagy91
by omarnagy91

load_document

Load a contract file to get normalized paragraph text, citation anchors, language mix, and document warnings, providing a structured starting point for legal review and analysis.

Instructions

Load a contract and return its normalised text with a citation anchor on every paragraph, plus the detected language mix. Start here. Returns the format, page count where the format has pages, per paragraph text direction for correct rendering of mixed Arabic and English, any encoding repairs that were applied, and any warnings such as a PDF with a lossy or missing text layer. Paragraph anchors look like "P12" and are the same anchors every other tool reports.

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.
includeTextNoInclude the full text of every paragraph. Default true. Set false for a structural overview of a long document without the body text.
maxParagraphsNoReturn at most this many paragraphs. Omit for all of them.

Schema Changelog

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

  1. First observedv1.0.0

TDQS

A4.1/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 full disclosure burden and largely meets it: it itemizes return fields (format, page count, per-paragraph text direction, encoding repairs, warnings) and flags edge cases like a PDF with a lossy or missing text layer. It stops short of disclosing error behavior for invalid paths or file-size limits, so not a 5.

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?

Four sentences, each earning its place: core purpose, entry-point cue, full return enumeration, and the anchor-convention note that ties the tool to its siblings. It is dense but front-loaded — the first sentence states the function and 'Start here' before any detail.

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?

Lacking both annotations and an output schema, the description substitutes a detailed return specification, which covers the main operational unknowns an agent must know before calling. The remaining gaps — error handling, file-size limits, and an explicit read-only statement — are minor for a 3-parameter load tool whose schema is fully documented.

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%, so the baseline of 3 applies — the schema already documents path format acceptance, content-based detection, includeText's default and purpose, and maxParagraphs semantics. The description reinforces the paragraph concept that includeText and maxParagraphs hinge on but adds no parameter-level facts beyond the schema.

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 opening sentence names a specific verb ('Load') and resource ('a contract') and enumerates exactly what it returns: normalised text, per-paragraph citation anchors, and detected language mix. The sibling tools are all downstream analysis operations (segment_clauses, extract_dates, find_clauses), so this is unmistakably the document-ingestion step. 'Start here' reinforces the distinct role.

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?

'Start here' explicitly positions this tool as the entry point in the workflow, before any sibling analysis tool. The note that anchors are 'the same anchors every other tool reports' implies the siblings operate on what this tool loads. It lacks explicit when-not-to-use or named-alternative routing, but the entry-point context is clear.

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