Skip to main content
Glama

parse_contract

Extract parties, key dates, financial terms, and essential clauses from contract PDFs into structured JSON.

Instructions

Extract structured data from a contract PDF.

Returns JSON with parties, key dates, financial terms, and essential clauses.

Args:
    file_url: Public URL of the PDF file (max 20MB).
    language: Document language(s) for OCR. Default: ita+eng.
    extract_clauses: Extract key clauses (termination, confidentiality, etc.). Default: true.
    extract_financial_terms: Extract fees, payment terms, penalties. Default: true.

Cost: $0.05 per document, paid via x402 USDC on Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_urlYes
languageNoita+eng
extract_clausesNo
extract_financial_termsNo
Behavior4/5

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

Despite no annotations, the description discloses important behavioral traits: cost ($0.05 via x402 USDC on Base), file size limit (max 20MB), and default languages. It does not cover failure modes or auth needs, but provides good context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear 'Args' section, each sentence adds value. It is concise yet complete, with no redundant information.

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?

Given no output schema and no annotations, the description covers purpose, parameters, cost, and output structure (JSON with specific fields). Lacks error handling details but is adequate for a 4-param tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by adding meaning to each parameter: file_url (public URL, max 20MB), language (default ita+eng), extract_clauses and extract_financial_terms (defaults and what they extract).

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 action ('Extract structured data') and target ('contract PDF'), differentiating it from siblings like parse_invoice or parse_bank_statement by specifying contract-specific extraction fields.

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 implicitly guides use by listing extracted content (parties, dates, financial terms, clauses), making it clear for contracts. However, it lacks explicit 'when to use' or 'alternatives' guidance, leaving room for improvement.

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

Install Server

Other Tools

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/fashionmascherine-svg/document-to-json-mcp'

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