> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getclean.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> getclean's own MCP server is at https://mcp.getclean.ai/mcp. The /mcp path of this docs site is Mintlify's search over these pages, not getclean.
> Every answer of the API opens with outcome. A page that could not be read is a record whose outcome says why, never an HTTP error; read outcome before anything else.
> The API's contract is the OpenAPI 3.1 file at https://docs.getclean.ai/openapi.yaml; the SDKs are generated from it.
> The product's name is written getclean, in lower case.

# Covenants and the definitions they depend on

> Read a 300-page credit agreement by its outline, mark every covenant, follow each defined term to its definition 200 pages away, and quote each clause with the page that is printed on it.

A covenant says that leverage must stay under 4.0. What leverage means is written 200 pages before it, in a definition of EBITDA (earnings before interest, taxes, depreciation, and amortization) that lists what can be added back. An analyst who reads the covenant without the definition approves a loan that the fund cannot call when the borrower's earnings fall. The agreement is 300 pages, the committee meets on Thursday, and your agent cannot read the whole text into its context at once.

## The run in 5 steps

### Upload the agreement

Send the file to `upload_contents` with `max_characters` set to `0`. The response has the outline, or a job if the work takes longer, and the outline then comes from `get_contents`. On an agreement with headings, the outline has every clause and schedule with its title, its size, and its pages. On a scan it has one row for each page. A scanned agreement is read from its page pictures, and each such page comes with a number that says how sure the reading is.

### Mark the covenants

Ask up to 5 questions in one call. Each passage that bears on a question comes back with its clause and its printed page.

```json Request body of highlight_contents theme={"theme":"css-variables"}
{
  "highlights": [
    "What is the maximum leverage ratio?",
    "What is the minimum interest cover?",
    "What happens on a change of control?",
    "Which events of default have no grace period?",
    "When can the borrower make an acquisition without consent?"
  ],
  "max_characters": 0
}
```

A model chooses these passages, and each is marked as `judged`. The words are the agreement's own.

### Follow each defined term

A defined term is written the same way wherever it is used. Send the term itself as a phrase, and its places come back in document order, found word for word. One call returns the first 50 places of a term, with the notice `highlights_cut` if there are more.

```json Request body of highlight_contents theme={"theme":"css-variables"}
{
  "highlights": ["Consolidated EBITDA", "Permitted Acquisition"],
  "deterministic_only": true,
  "max_characters": 0
}
```

The first place of "Consolidated EBITDA" is in the definitions, and the others are the clauses that use it. Your agent then has the covenant and the definition it depends on, 200 pages apart, without having read the pages between them. This call uses no model and costs nothing.

### Read each definition whole

A definition and its list of add-backs are blocks in a row. Read them with `list_blocks` and `block_ids`, and each block comes whole, not cut at some length.

### Quote each clause with its printed page

A lawyer cites "clause 22.2, page 71", and the page 71 that is printed in the agreement need not be the 71st page of the file. Each passage has its position in the file and, where the agreement declares printed page numbers, the printed one. So the memo cites the page as the agreement prints it, and a program can still open the right page of the file.

## What the committee can check

| The committee asks | What the memo has |
| - | - |
| Where does the agreement say this? | The clause, the printed page, and the words. |
| What does this term include? | The definition, quoted whole, with its own page. |
| Was the whole agreement read? | The number of pages read, and the pages that failed or were read with low confidence. |
| What changed in the amendment? | A comparison of the 2 versions, clause by clause. |

## Know the limits

A term on a scanned page is found only if the page was read right. A search for exact words does not match a term that the recognition misread, so look at the pages with a low confidence before you say that a term is not used.

Nothing is translated. For an agreement in German, write the questions in German.

The pricing grid in a schedule comes cell by cell from a Word file or a PDF with structure, and as text from a scan.

For the calls, see [Read the 2 sections you need from a 300-page document](https://docs.getclean.ai/read/long-documents.md) and [Highlight the evidence for each question](https://docs.getclean.ai/read/highlight-passages-and-answers.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.