Skip to main content
Glama

analyze_contract

Upload a contract document to extract text, split clauses, score clause risk, and get a verdict. Replace an existing contract via contract_id or create a new one with company details.

Instructions

Upload a contract document and run PAKT's pipeline on it: text extraction (OCR for scans), clause splitting, the risk of every clause and the verdict. Give contract_id to replace an existing contract's document, or company, title, contract_number, start_date and our_role to create a new contract. Waits for the analysis - usually a minute or two - and returns the same overview as get_contract.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoFor a new contract: its title.
companyNoFor a new contract: its company, by name (it must exist in PAKT).
our_roleNoThe party we are, as the contract names it, e.g. İcarəçi or Sifarişçi. Risk is scored from this side.
file_pathYesThe contract document on this computer: PDF, PNG or JPEG, at most 20 MB.
start_dateNoFor a new contract: its start date, YYYY-MM-DD.
contract_idNoAn existing contract whose document this replaces.
wait_secondsNoHow long to wait for the analysis.
contract_numberNoFor a new contract: its number.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does disclose useful behavior: OCR for scans, clause splitting, per-clause risk, a synchronous wait of about one to two minutes, and output equivalence to get_contract. However, it does not state whether replacing a document is reversible, what permissions are required, or what happens on failure, which are important for a mutating, long-running tool.

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?

Three sentences, front-loaded with the core action and pipeline, then the two usage modes, then timing and return behavior. No filler; every sentence carries useful 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?

For a complex, synchronous, mutating tool with an output schema present, the description covers the pipeline, timing, and create-vs-replace modes. It omits some operational details such as failure behavior and prerequisite validation, but those gaps are relatively small given the output schema and detailed parameter schema.

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 schema already explains each parameter. The description adds useful grouping by distinguishing the contract_id replacement mode from the new-contract creation fields, but it does not add syntax, constraints, or semantics beyond what the schema already provides.

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?

States a specific verb+resource: uploading a contract and running PAKT's analysis pipeline. It names the processing steps and tells the agent the return is equivalent to get_contract, making its purpose clear relative to at least one sibling.

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?

Explicitly explains the two usage modes: pass contract_id to replace an existing document, or pass company/title/contract_number/start_date/our_role to create a new contract. It gives clear context but does not explicitly state when-not to use this tool or name alternative siblings like compare_amendment.

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