> For the complete documentation index, see [llms.txt](https://api-docs.hengelending.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.hengelending.com/mcp/tool-reference/loan-guidelines.md). Agents can also search and read this documentation through its [MCP server](https://api-docs.hengelending.com/~gitbook/mcp).

# Loan guidelines

Search investor guidelines, and curate the guideline library.

{% hint style="info" %}
Generated from the MCP server's code. Do not edit this page in GitBook: changes are overwritten on the next sync.
{% endhint %}

## approve\_guideline

Approve a pending guideline so it is indexed and becomes searchable. Provide investorName when the guideline is waiting because its investor is unrecognised; set registerInvestorIfNew only when this is genuinely a new correspondent relationship, because a misspelling and a new investor look identical here and silently creating one from a typo splits an investor's guidelines in two. If the pending item carries a supersedesDocumentId, approving RETIRES that guideline — its passages stop answering questions — so confirm that is intended before calling. Approval is recorded against the authenticated user.

**Who can call it:** Admin, CompanyAdmin, Processor

**Reads or writes:** writes; can delete, cost money or reach someone outside, so a client should ask first

| Input                   | Type    | Description                                                                                                                                                                                                                                                   |
| ----------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `documentId`            | string  | From list\_pending\_guidelines. Required.                                                                                                                                                                                                                     |
| `investorName`          | string  | Required when reviewReason is UnknownInvestor. Use the investor's canonical name from list\_guideline\_investors where one matches.                                                                                                                           |
| `registerInvestorIfNew` | boolean | Set only for a genuinely new correspondent relationship. A misspelling and a new investor are indistinguishable here, and creating one from a typo splits that investor's guidelines across two names, so this is never a retry for a name that was rejected. |
| `channel`               | string  | Delivery channel when registering a new investor, e.g. "Non-Delegated".                                                                                                                                                                                       |

## backfill\_guideline\_investors

Register investors that already have guidelines in the corpus but no registry entry. For corpora loaded before the registry existed: without this, the first re-upload of a guideline that has been answering questions for months is held for an unrecognised investor. It reads the investors off the indexed documents themselves, so what gets registered is exactly what is already in use — no re-import, no re-extraction, no cost. Investors already registered are left untouched, including aliases added since. Run with dryRun first to see what it would register.

**Who can call it:** Admin, CompanyAdmin, Processor

**Reads or writes:** writes

| Input    | Type    | Description                                                                  |
| -------- | ------- | ---------------------------------------------------------------------------- |
| `dryRun` | boolean | Report what would be registered without writing anything. Defaults to false. |

## deactivate\_guideline\_investor

Mark a correspondent relationship as ended. New guidelines can no longer be loaded for this investor, and their name stops being offered. Their EXISTING guidelines are deliberately left in place and keep answering questions, because a company usually stops delivering to an investor long before it stops needing to explain loans already delivered under their rules — retire those individually if they should stop.

**Who can call it:** Admin, CompanyAdmin, Processor

**Reads or writes:** writes; can delete, cost money or reach someone outside, so a client should ask first

| Input   | Type   | Description |
| ------- | ------ | ----------- |
| `name`  | string | Required.   |
| `notes` | string |             |

## list\_guideline\_investors

List the correspondent investors this company is registered to deliver to, and whose guidelines may therefore be loaded. These are the exact names the investors filter on search\_loan\_guidelines accepts, along with the aliases that resolve to each one. An investor that is not listed here has no guidelines in the corpus, which says nothing about their actual requirements — it is a gap in what has been loaded.

**Who can call it:** Admin, CompanyAdmin, Processor

**Reads or writes:** reads only

| Input             | Type    | Description                                                        |
| ----------------- | ------- | ------------------------------------------------------------------ |
| `includeInactive` | boolean | Include investors whose relationship has ended. Defaults to false. |

## list\_pending\_guidelines

List investor guidelines that need someone's attention: those uploaded and waiting for approval to publish, and those whose extraction or indexing FAILED. Check `status` on every item. Every guideline waits after extraction — publishing changes the answers underwriters receive, and a replacement deletes the edition it supersedes, so neither happens automatically. An AwaitingReview item reports why it is waiting (UnknownInvestor, NewGuideline or Replacement), what was parsed from the document (title, effective date, page count), the investor it appears to come from when that is unconfirmed, and the id of the guideline that approving would retire — supersedesDocumentId being present means approving removes a guideline that is currently answering questions. A Failed item is a different problem: it is broken rather than waiting, `error` says how, it may already have been approved, and until it is fixed and re-ingested its investor will read as a gap in the corpus. This is also the call that answers "is anything wrong with the corpus?" — an empty result means nothing is pending AND nothing has failed.

**Who can call it:** Admin, CompanyAdmin, Processor

**Reads or writes:** reads only

Takes no inputs.

## register\_guideline\_investor

Register a correspondent investor so their guidelines can be loaded, or update one already registered. The name must match the corpus folder their documents arrive in and is what appears in every citation. Aliases are the other ways people write the investor — CitiMortgage, A\&D, PMC — and are what let a question naming one of those resolve to this investor; adding them here means a new investor is usable immediately rather than after a deployment. Registering an existing investor updates it in place; it never creates a duplicate.

**Who can call it:** Admin, CompanyAdmin, Processor

**Reads or writes:** writes

| Input     | Type            | Description                                                                                                                                       |
| --------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`    | string          | Canonical name. Must match the corpus folder their documents arrive in, and appears in every citation. Required.                                  |
| `aliases` | array of string | Other ways people write this investor — "CitiMortgage", "A\&D", "PMC". These are what let a question naming one of them resolve to this investor. |
| `channel` | string          | Delivery channel the relationship runs under, e.g. "Non-Delegated". The same investor often publishes different requirements per channel.         |
| `notes`   | string          |                                                                                                                                                   |

## retire\_guideline

Withdraw a published guideline so it stops answering questions — for a product an investor discontinued, or a relationship that ended. This removes its passages from search; it is not how you replace a guideline with a newer edition (upload the new edition at the same corpus path instead, which supersedes the old one on approval). A reason is required and is recorded with the withdrawal, because a guideline vanishing from the corpus is asked about months later. Only guidelines can be retired this way; borrower documents belong to a loan and are not removed here.

**Who can call it:** Admin, CompanyAdmin, Processor

**Reads or writes:** writes; can delete, cost money or reach someone outside, so a client should ask first

| Input        | Type   | Description                                                                                                                                   |
| ------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `documentId` | string | Required.                                                                                                                                     |
| `reason`     | string | Why it is being withdrawn — required, and recorded. This is what answers "why does nothing come back for this product any more" months later. |

## search\_loan\_guidelines

Search your company's correspondent-investor underwriting guideline corpus and return cited passages. Use it for any question about whether a scenario is eligible, what an investor requires, or where a rule comes from — minimum FICO, LTV and CLTV limits, DTI, reserves, property or occupancy eligibility, derogatory-credit seasoning, documentation requirements, overlays. The corpus holds the correspondent investor guidelines (product profiles and full correspondent manuals) that your company has loaded and, where your company has loaded one, an agency baseline such as the Fannie Mae Selling Guide — its passages carry guidelineType AgencyBaseline, and coverage.hasAgencyBaseline says whether one is present. It is NOT a rate or pricing engine — for rates call search\_pricing. Results are always limited to your own company's guidelines, so they reflect the investors your company actually delivers to. Every result carries a citation, a section path and an effective date; quote them, and never state a guideline this tool did not return. Read the response's notes and coverage before concluding anything from few or no hits: an investor absent from coverage tells you nothing about that investor's rules. When coverage.hasAgencyBaseline is true, check an investor's silence against the agency passages, and cite the agency rule as the agency's, not the investor's; when it is false, a topic no passage mentions is unknown rather than permitted.

**Who can call it:** Admin, CompanyAdmin, Processor, DualLicensedAgent, ConciergeKey, Agent

**Reads or writes:** reads only

| Input        | Type            | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------ | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `query`      | string          | What to look up, in the underwriter's own words. Describe the scenario or the rule rather than guessing at document titles — retrieval is hybrid keyword plus semantic, so "620 minimum FICO manufactured home cash-out" works better than "product profile". Required.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `investors`  | array of string | Optional. Narrow to specific investors, e.g. \["Pennymac"]. Names are matched loosely against the corpus, and any that match nothing are reported back in unresolvedInvestors. Which to use depends on the question being asked. SET IT when the question is about what a particular investor requires — if the user named an investor, name it here, because these lenders publish near-identical matrices and an unfiltered search readily returns another lender’s numbers under a correct-looking citation. LEAVE IT EMPTY when the question is whether a scenario can be placed at all, or which investors would take it: there, a clean answer from one investor says nothing about the others, and filtering would hide the comparison the user actually wants. |
| `programs`   | array of string | Optional. Narrow to loan programs, e.g. \["FHA", "VA"]. Programs are inferred from document and section titles, so documents with no inferred program (a full correspondent manual, whose title names none) are always included rather than filtered out.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `documentId` | string          | Optional. Narrow to one document by the id returned on a previous hit, e.g. "pennymac/fha-product-profile-2". Use this to read more of a document a prior search surfaced.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `channel`    | string          | Optional. Narrow to a delivery channel: "Non-Delegated" or "Delegated". Only set this when the scenario states the channel — the same investor publishes different minimums per channel, and filtering to the wrong one hides the rule that governs.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `top`        | integer         | Optional. Maximum passages to return. Defaults to 10, capped at 50. Raise it when comparing several investors at once, since each investor's rule needs its own passage.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://api-docs.hengelending.com/mcp/tool-reference/loan-guidelines.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
