> 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/conditions.md). Agents can also search and read this documentation through its [MCP server](https://api-docs.hengelending.com/~gitbook/mcp).

# Conditions

A loan's conditions and the requests under them. The task tools are deprecated: use the condition tools named in each one's description.

{% 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 %}

## add\_loan\_condition\_internal\_note

Add an Internal Note to an underwriting condition. THIS WRITES TO THE LOS, the Loan Origination System of record: the note is appended to the condition's Internal Notes there (CondInternalNotes), stamped with your name and today's date, and the existing notes are kept. Internal Notes are read by underwriters and processors, never by the borrower; write them that way. Identify the loan by its MLM ExternalId (preferred) or internal GUID and the condition by conditionTaskId from get\_loan\_application\_conditions. DO NOT CALL THIS TWICE FOR THE SAME NOTE: each call appends, so a retry adds the note a second time - if a call appears to fail, read the condition back with get\_loan\_application\_conditions and check internalNotes first. Returns the condition's full Internal Notes after the append. Refused when the condition or the loan is not linked to the LOS. Restricted to Admin and Processor. An entry is written to the loan's activity log.

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

**Reads or writes:** writes

| Input               | Type          | Description                                                                                                                                                                                                                                                                                                                             |
| ------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `conditionTaskId`   | string (uuid) | REQUIRED. The condition's task id, as returned by get\_loan\_application\_conditions.                                                                                                                                                                                                                                                   |
| `note`              | string        | REQUIRED. The note to add, as plain text, for example "Borrower says the 2024 return is with the CPA, expected Friday". It is appended to the condition's existing Internal Notes in the LOS with your name and today's date; nothing already there is changed. Internal: underwriters and processors read it, the borrower never does. |
| `externalId`        | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored.                                      |
| `loanApplicationId` | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                                                              |

## convert\_loan\_tasks\_to\_conditions

Write a loan's requests to the LOS as PRELIM conditions: the conversion submission runs, for a loan submitted before tasks became conditions, and the retry after a part-way failure. THIS WRITES TO THE LOS, the Loan Origination System of record. Identify the loan by its MLM ExternalId (preferred) or internal GUID; the loan must already be in the LOS. Requests that sit under no condition are put under one first, grouped by name; then each local condition without an LOS id is created in the LOS and keeps its id. A condition whose tasks are all accepted is written cleared; one task not accepted keeps it open. Safe to call again: only conditions without an LOS id are written, so a second call creates no duplicate. Returns the conditions written, how many already had an LOS id, and any that failed (call again to retry those). Restricted to Admin and Processor. An entry per condition is written to the loan's activity log.

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

**Reads or writes:** writes

**Availability:** only where the `tasks-as-conditions` release flag is on for the caller.

| Input               | Type          | Description                                                                                                                                                                                                                                                                                        |
| ------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `externalId`        | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored. |
| `loanApplicationId` | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                         |

## create\_loan\_application\_task

Deprecated, use create\_loan\_condition. This tool still works; planned removal 2027-01-31. Create a task on a loan application: a document request, a question, or a work item for a colleague. Identify the loan by its MLM ExternalId (preferred) or its internal Henge GUID. THIS IS A WRITE THE BORROWER SEES: a task with no assignedToUserId is a borrower to-do and appears in the borrower's portal immediately, so only create what the user actually asked for. Name the kind of task with itemCode from get\_loan\_task\_items and give it a name; optionally add a description, choose how a question is answered (questionType: ShortAnswer, the default for a question item, or YesNoResponse), assign it to an internal user (assignedToUserId, which makes it a user task instead) or to one borrower (assignedToBorrowerId), mark it required, link it to an underwriting condition (conditionTaskId), and subscribe yourself to its status changes. A TransactionHistory task (a borrower's account activity over a period) also needs the asset account (assetAccountId) and the period (requestedStartDate, requestedEndDate), and is created on that account. The new task starts at status Requested. An entry is written to the loan's activity log. Returns the new task's id and timestamps. Rejected when itemCode is missing or unknown, when name is blank, when itemCode is 'Condition' (conditions come from the Loan Origination System and cannot be created here), or when conditionTaskId is not a live condition on the same loan.

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

**Reads or writes:** writes

| Input                  | Type          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `itemCode`             | string        | REQUIRED. The task item's code, exactly as get\_loan\_task\_items returns it (for example CheckingBankStatements, SavingBankStatements, PurchaseAgreement, OtherQuestion). Case-insensitive. Always call get\_loan\_task\_items first rather than guessing a code. The task's type is taken from that item's default type. 'Condition' is rejected: underwriting conditions come from the Loan Origination System and cannot be created here. |
| `name`                 | string        | REQUIRED. What the task is called, as the borrower or the assigned user will see it in their to-do list (for example "Last 2 months checking statements"). Up to 1024 characters.                                                                                                                                                                                                                                                             |
| `description`          | string        | Optional instructions shown under the task name, up to 1024 characters. Use it to say exactly what is needed (which months, which account, which borrower).                                                                                                                                                                                                                                                                                   |
| `questionType`         | string        | For a question item only (IncomeQuestion, AssetsQuestion, MiscQuestion, OtherQuestion): how it is answered, ShortAnswer (free text) or YesNoResponse. Defaults to ShortAnswer. Rejected on any other item.                                                                                                                                                                                                                                    |
| `assignedToUserId`     | string (uuid) | Assign the task to an internal Henge user (loan officer, processor) by their userId. Supplying this makes it a USER task, visible through get\_loan\_application\_user\_tasks. Leave it out for a borrower task. Get ids from get\_current\_user or search\_users.                                                                                                                                                                            |
| `assignedToBorrowerId` | string (uuid) | Assign the task to one specific borrower on the loan, by the borrowerId returned in get\_loan\_application. Leave it out to address the task to the loan's borrowers generally. Ignored when assignedToUserId is supplied.                                                                                                                                                                                                                    |
| `isRequired`           | boolean       | Whether the task must be completed before the file can move forward. Defaults to false.                                                                                                                                                                                                                                                                                                                                                       |
| `conditionTaskId`      | string (uuid) | Link the new task to an underwriting condition, by the condition's task id from get\_loan\_application\_conditions. The condition must be on the same loan and must not itself be a child. Leave it out for a standalone task.                                                                                                                                                                                                                |
| `assetAccountId`       | string (uuid) | REQUIRED when itemCode is TransactionHistory, ignored otherwise. The asset account whose transaction history is requested, by its id from get\_loan\_assets. The task is created on that account.                                                                                                                                                                                                                                             |
| `requestedStartDate`   | string (date) | REQUIRED when itemCode is TransactionHistory, ignored otherwise. The first day of the requested period, as yyyy-MM-dd. On or before requestedEndDate. Also state the period in description, which is what the borrower and the emails show.                                                                                                                                                                                                   |
| `requestedEndDate`     | string (date) | REQUIRED when itemCode is TransactionHistory, ignored otherwise. The last day of the requested period, as yyyy-MM-dd. Not in the future; use today's date for "through current".                                                                                                                                                                                                                                                              |
| `notifyOnStatusChange` | boolean       | Subscribe yourself to email notifications when this task's status changes (submitted, accepted, rejected). Defaults to false.                                                                                                                                                                                                                                                                                                                 |
| `externalId`           | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored.                                                                                                                                            |
| `loanApplicationId`    | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                                                                                                                                                                    |

## create\_loan\_condition

Create a condition on a loan, in one of two ways. (1) WITH itemCode (a request kind from get\_loan\_task\_items: a document, a question or a form) and a description naming it: creates that request under a condition, on a loan that has not been submitted yet (the condition is kept in Henge and written to the LOS when the loan is submitted) and on a loan already in the LOS (the condition is written there at once, as a PRELIM condition). Open to every role that may create a task. THIS IS A WRITE THE BORROWER SEES: a request with no assignedToUserId is a borrower to-do in their portal at once, so create only what the user asked for. Optionally set questionType, assignedToUserId (from get\_assignable\_users), assignedToBorrowerId and isRequired. Returns conditionTaskId, the condition's id, which is the same before and after submission and works in every condition tool, and taskId, the request. A form is not put under a condition: you get its taskId and no conditionTaskId, and a note says so. Needs the company's tasks-as-conditions release flag. (2) WITHOUT itemCode: author an LOS condition directly. THIS WRITES TO THE LOS, the Loan Origination System of record - the condition becomes real for the underwriter, the processor, the loan officer and (unless hidden) the borrower. Give the condition text as description, optionally a short name (the title its row shows in Henge; the LOS does not hold it; omitted, one is written from the description), a category from get\_loan\_condition\_categories, a due date, and the document it asks for as documentTypeId from get\_loan\_document\_types (folder, then type). Admin and Processor only, on a loan already in the LOS. Identify the loan by its MLM ExternalId (preferred) or its internal Henge GUID. DO NOT CALL THIS TWICE FOR THE SAME CONDITION: the LOS does not match conditions on their text, so a repeat call creates a SECOND condition rather than updating the first - if a call appears to fail, read the conditions back with get\_loan\_conditions before trying again. A response with isMirrored=false is a SUCCESS: the condition was created in the LOS and only its Henge copy is pending. Internal notes are not set here (use add\_loan\_condition\_internal\_note) and neither is a local rewording. An entry is written to the loan's activity log.

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

**Reads or writes:** writes

| Input                  | Type          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ---------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`                 | string        | Optional. The condition's short name: the title people see in the loan's condition list, with the description under it. A few words that say what is asked for, for example "Purchase contract" or "2025 amended return explanation"; at most 100 characters. Omit it and a short name is written for you from the description; either way it is returned as name, and update\_loan\_condition changes it. It is kept in Henge only (the LOS has no name field).                                                                                                                                                                                                                                                                                                                                                                      |
| `description`          | string        | REQUIRED. The condition text exactly as it should read in the Loan Origination System, for example "Provide 2024 federal tax returns, all schedules". Write it the way an underwriter would: this is what everyone working the file will see, and it is written to the LOS verbatim. With itemCode it is also the name of the request, which the borrower reads in their portal.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `itemCode`             | string        | The kind of request to create under the condition, exactly as get\_loan\_task\_items returns it (a document such as CheckingBankStatements or PurchaseAgreement, a question such as OtherQuestion, or a form). Case-insensitive. WITH itemCode this works on a loan that has not been submitted yet (the condition is kept in Henge and written to the LOS when the loan is submitted) and on one already in the LOS (the condition is written there now), and every role that may create a task may use it; category, dueDate, isHidden and documentTypeId are then not accepted (change them afterwards with update\_loan\_condition, Admin and Processor). WITHOUT itemCode this authors an LOS condition directly: Admin and Processor only, on a loan already in the LOS, and category, dueDate and documentTypeId are required. |
| `questionType`         | string        | With a question itemCode only: how it is answered, ShortAnswer (free text, the default) or YesNoResponse. Rejected on any other kind.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `assignedToUserId`     | string (uuid) | With itemCode only. Assign the request to an internal user (loan officer, processor) by userId from get\_assignable\_users, which makes it a staff work item hidden from the borrower. Leave it out for a borrower request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `assignedToBorrowerId` | string (uuid) | With itemCode only. Address the request to one borrower on the loan, by the borrowerId from get\_loan\_application. Ignored when assignedToUserId is supplied.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `isRequired`           | boolean       | With itemCode only. Whether the request must be completed before the file can move forward. Defaults to false.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `category`             | string        | REQUIRED without itemCode, not accepted with it. The condition's category, which must be one of the values get\_loan\_condition\_categories returns for this loan (for example AUS, CREDIT, PTD, PTF). Case-insensitive. ALWAYS call get\_loan\_condition\_categories first rather than guessing: the LOS does not validate this field and would silently create an unrecognised value as a permanent new category that cannot be deleted, so anything unknown is refused here.                                                                                                                                                                                                                                                                                                                                                       |
| `dueDate`              | string (date) | REQUIRED without itemCode, not accepted with it, as yyyy-MM-dd. The LOS refuses to create a condition without a due date.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `isHidden`             | boolean       | Whether to hide the condition from the borrower. A hidden condition is NOT visible to the borrower; it stays visible to staff working the file - Admin, CompanyAdmin, Processor and the loan officer (Agent, DualLicensedAgent, ConciergeKey). Defaults to FALSE (visible to everyone who can see the loan, borrower included) - only set it to true when the user has explicitly asked for an internal-only condition.                                                                                                                                                                                                                                                                                                                                                                                                               |
| `documentTypeId`       | string (uuid) | REQUIRED without itemCode, not accepted with it. The document the condition asks for: the id of a document type from get\_loan\_document\_types, which lists them by folder (pick the folder, then the type - for example BORROWER > PASSPORT, INCOME > PAYSTUBS). Use the type's id field, not its name. ALWAYS call get\_loan\_document\_types rather than guessing; a retired type or an unknown id is refused.                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `externalId`           | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `loanApplicationId`    | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

## delete\_loan\_application\_task

Delete a loan application task. Identify the loan by its MLM ExternalId (preferred) or its internal Henge GUID and the task by taskId from get\_loan\_application\_user\_tasks or get\_loan\_application\_borrower\_tasks. THIS DELETES MORE THAN THE ONE TASK AND CANNOT BE UNDONE FROM HERE: any tasks linked to it as children of a condition are deleted too, along with every document attached to those tasks, and those documents are also removed from the LOAN ORIGINATION SYSTEM. Confirm with the user before calling it, and prefer update\_loan\_application\_task when the task only needs correcting. Returns the deleted task's id.

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

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

| Input               | Type          | Description                                                                                                                                                                                                                                                                                        |
| ------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `taskId`            | string (uuid) | REQUIRED. The id of the task to delete, as returned by get\_loan\_application\_user\_tasks, get\_loan\_application\_borrower\_tasks or get\_loan\_application\_conditions.                                                                                                                         |
| `externalId`        | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored. |
| `loanApplicationId` | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                         |

## get\_assignable\_users

List the internal users a task on a loan application can be assigned to: the loan officer, their ConciergeKey user when they have one, and the company's processors. Identify the loan by its MLM ExternalId (preferred) or its internal Henge GUID. Use a returned id as assignedToUserId on update\_loan\_application\_task or create\_loan\_application\_task. Each user returns id, firstName, lastName and role (LoanOfficer, ConciergeKey or Processor).

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

**Reads or writes:** reads only

| Input               | Type          | Description                                                                                                                                                                                                                                                                                        |
| ------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `externalId`        | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored. |
| `loanApplicationId` | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                         |

## get\_loan\_application\_borrower\_tasks

Deprecated, use get\_loan\_conditions. This tool still works; planned removal 2027-01-31. Retrieve the borrower-assigned tasks (document requests, e-sign requests, questions, conditions) for a Henge loan application, identified by either its MLM ExternalId (preferred when the loan is in MLM) or its internal Henge GUID. Excludes deleted tasks, asset-account verification tasks, the wizard's Loan Application tasks (section verification tasks, Loan App Questions) and any task under a condition; when the loan's requests are under conditions this list is empty and the reply's note says so, so use get\_loan\_conditions to list them. Section progress is reported by get\_loan\_application's sectionCompletion instead. A borrower (Client) caller can read only loans on which they are a borrower.

**Who can call it:** Admin, Agent, Processor, ConciergeKey, Client

**Reads or writes:** reads only

| Input               | Type          | Description                                                                                                                                                                                                                                                                                        |
| ------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `externalId`        | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored. |
| `loanApplicationId` | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                         |

## get\_loan\_application\_conditions

Retrieve the underwriting conditions synced from MLM for a Henge loan application, identified by either its MLM ExternalId (preferred when the loan is in MLM) or its internal Henge GUID. Each condition carries the tasks linked to it, ordered by condition number. A condition's name is its short title, the one its row shows in the web app, and description is what it asks for; the name is kept in Henge only and is changed with update\_loan\_condition, and a name of the form "Condition 5" is a placeholder left when no name could be written, and can be replaced with update\_loan\_condition. Tasks linked to a condition are deliberately absent from get\_loan\_application\_borrower\_tasks and get\_loan\_application\_user\_tasks, so this is the only tool that returns them. Excludes deleted conditions and deleted tasks. For Admin and Processor callers each condition also carries internalNotes: the Internal Notes the LOS holds on the condition, written by underwriters and processors for each other. Treat them as internal only: never quote them to a borrower or put them in anything borrower-facing, and do not confuse them with the condition's description, which is what is being asked for. internalNotes is null for every other role, and when the condition has none. A borrower (Client) caller can read only loans on which they are a borrower, sees only the borrower-assigned tasks under each condition, gets no internal notes, and conditions with nothing left for the borrower are omitted.

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

**Reads or writes:** reads only

| Input               | Type          | Description                                                                                                                                                                                                                                                                                        |
| ------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `externalId`        | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored. |
| `loanApplicationId` | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                         |

## get\_loan\_application\_user\_tasks

Deprecated, use get\_loan\_conditions. This tool still works; planned removal 2027-01-31. Retrieve the internal user-assigned tasks (loan officer and processor work items) for a Henge loan application, identified by either its MLM ExternalId (preferred when the loan is in MLM) or its internal Henge GUID. Admins, Processors, and ConciergeKey users see all user tasks; other callers see only tasks assigned to them. Excludes deleted tasks, asset-account verification tasks, underwriting conditions, and any task linked to a condition; when the loan's requests are under conditions this list is empty and the reply's note says so, so use get\_loan\_conditions (or get\_loan\_application\_conditions) to list them.

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

**Reads or writes:** reads only

| Input               | Type          | Description                                                                                                                                                                                                                                                                                        |
| ------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `externalId`        | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored. |
| `loanApplicationId` | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                         |

## get\_loan\_condition\_categories

List the condition categories that create\_loan\_condition and update\_loan\_condition will accept for this loan's company (for example AUS, CREDIT, PTD, PTF). Call this BEFORE authoring a condition and pick one of these values: the LOS does not validate the category field and would silently turn a typo into a permanent new category that cannot be deleted, so any value not on this list is refused. The list is the categories configured in the LOS plus any the company's existing conditions use - if none of these fit, ask the user rather than inventing one. Restricted to Admin and Processor, matching the condition write tools.

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

**Reads or writes:** reads only

| Input               | Type          | Description                                                                                                                                                                                                                                                                                        |
| ------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `externalId`        | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored. |
| `loanApplicationId` | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                         |

## get\_loan\_conditions

Retrieve a loan's conditions with their requests and documents nested, identified by either its MLM ExternalId (preferred when the loan is in MLM) or its internal Henge GUID. Each condition carries the requests under it (document requests, questions, e-sign requests) in tasks, each with its status, assignee and the document it holds, ordered by condition number; the id of a condition is the same before and after the loan is submitted. requestsUnderNoCondition lists the requests that sit under no condition (forms, and every request while the company's requests are not conditioned yet). This replaces get\_loan\_application\_borrower\_tasks and get\_loan\_application\_user\_tasks, and get\_loan\_application\_conditions is the same condition list. Excludes deleted conditions and requests, asset-account verification tasks and the wizard's Loan Application tasks (section progress is get\_loan\_application's sectionCompletion). For Admin and Processor callers each condition also carries internalNotes: the Internal Notes the LOS holds on the condition, written by underwriters and processors for each other. Treat them as internal only: never quote them to a borrower or put them in anything borrower-facing, and do not confuse them with the condition's description, which is what is being asked for. internalNotes is null for every other role. Staff see the staff work items assigned to them (Admin, Processor and ConciergeKey see all of them). A borrower (Client) caller can read only loans on which they are a borrower, sees only the borrower-assigned requests, gets no internal notes, and conditions with nothing left for the borrower are omitted.

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

**Reads or writes:** reads only

| Input               | Type          | Description                                                                                                                                                                                                                                                                                        |
| ------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `externalId`        | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored. |
| `loanApplicationId` | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                         |

## get\_loan\_task\_items

Return every task item a loan application task can be created under: the vocabulary of things that can be asked for (bank statements, purchase agreement, credit report, a free-form question, and so on). Each item returns its id, code, name, description, displayOrder, its default task type, canCreateManually (whether it is meant to be raised by hand) and canUploadDocument (whether the task accepts a file). Call this before create\_loan\_application\_task: the 'code' returned here is the only value that tool accepts for itemCode, so never guess a code or invent an id. The list is the same for every company and changes only when the vocabulary itself is revised. Items that exist only so a document can be filed under its LOS type (staffOnly) are left out for every role except Admin and Processor.

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

**Reads or writes:** reads only

Takes no inputs.

## replace\_loan\_condition\_internal\_notes

REPLACE a condition's ENTIRE Internal Notes in the LOS, the Loan Origination System of record. DESTRUCTIVE: the LOS holds one text field per condition, not a list of entries, so the text you send becomes the whole field and every entry you leave out is DELETED, including notes written by underwriters and other processors. Nothing is stamped or appended; the text is written exactly as given. Use this only to correct or remove an entry; to add a note use add\_loan\_condition\_internal\_note. Read the condition first with get\_loan\_application\_conditions and pass its internalNotes as expectedNotes; if the LOS holds anything else (someone changed the notes, or the copy you read was behind) the call is refused with a Conflict, nothing is written, and the Conflict message carries the text the LOS holds now: show that to the user and build any new attempt from it, never resend the same call. "" for notes clears the field. The LOS is read back after the write; if it did not take the new text the call fails and nothing changes in Henge. Show the user the exact new text, and what it removes, and get their explicit approval before calling: an entry removed here cannot be restored from Henge, and the only copy is previousInternalNotes in this tool's response. Identify the loan by its MLM ExternalId (preferred) or internal GUID and the condition by conditionTaskId. Returns previousInternalNotes and the internalNotes now held. Refused when the condition or the loan is not linked to the LOS. Restricted to Admin and Processor. An entry is written to the loan's activity log.

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

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

| Input               | Type          | Description                                                                                                                                                                                                                                                                                                                         |
| ------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `conditionTaskId`   | string (uuid) | REQUIRED. The condition's task id, as returned by get\_loan\_application\_conditions.                                                                                                                                                                                                                                               |
| `expectedNotes`     | string        | REQUIRED. The condition's current internalNotes, copied exactly as get\_loan\_application\_conditions returned them ("" when they are empty). The replace goes ahead only if the LOS still holds this text; otherwise the call is refused with a Conflict whose message carries the text the LOS holds now, and nothing is written. |
| `notes`             | string        | REQUIRED. The COMPLETE new Internal Notes, written exactly as given: no author stamp and no separator are added, and every entry you leave out is deleted. To remove one entry, send the current text without that entry. "" clears the field.                                                                                      |
| `externalId`        | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored.                                  |
| `loanApplicationId` | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                                                          |

## set\_loan\_task\_condition

Link a loan application task to an underwriting condition, move it from one condition to another, or unlink it, in one step. Identify the loan by its MLM ExternalId (preferred) or its internal Henge GUID, the task by taskId from get\_loan\_application\_user\_tasks, get\_loan\_application\_borrower\_tasks or get\_loan\_application\_conditions, and the condition by conditionTaskId from get\_loan\_application\_conditions; send conditionTaskId as null to unlink. conditionTaskId is REQUIRED even when null: omitting it is rejected, so a forgotten argument can never unlink a task by accident. THIS REACHES THE LOAN ORIGINATION SYSTEM: any of the task's documents already filed there are re-associated from the old condition to the new one before the task is saved, so an LOS refusal leaves the task where it was and the call can be retried. Every copy of a multi-document request moves together. Setting the condition the task is already under changes nothing. The condition rows themselves cannot be moved, and update\_loan\_application\_task does not touch the link. Returns the task's id and timestamps. Rejected when taskId or conditionTaskId is missing, when the task is an underwriting condition, when conditionTaskId is not a live condition on the same loan, or when the task has tasks linked to it.

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

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

| Input               | Type          | Description                                                                                                                                                                                                                                                                                        |
| ------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `taskId`            | string (uuid) | REQUIRED. The id of the task to link, move or unlink, as returned by get\_loan\_application\_user\_tasks, get\_loan\_application\_borrower\_tasks or get\_loan\_application\_conditions (a task nested under a condition).                                                                         |
| `conditionTaskId`   | any           | REQUIRED, and null is a valid value. The condition's task id from get\_loan\_application\_conditions to link or move the task to, or null to unlink it from its current condition. Omitting the field is rejected, so a forgotten argument can never unlink a task by accident.                    |
| `externalId`        | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored. |
| `loanApplicationId` | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                         |

## set\_loan\_task\_status

Deprecated, use update\_loan\_condition. This tool still works; planned removal 2027-01-31. Move a loan application task to InProgress, Complete or Requested. Identify the loan by its MLM ExternalId (preferred) or its internal Henge GUID and the task by taskId from get\_loan\_application\_user\_tasks or get\_loan\_application\_borrower\_tasks. This runs exactly what the web app runs for the same change. Only Loan Application tasks (type LoanApplication) change status this way: a document task moves by being uploaded, accepted or rejected, which this tool does not do. Complete marks the task Accepted. Returns the task as it stands after the change. Rejected when taskId or status is missing or unknown, when the task is a section verification task (sections are signed off through the section sign-off path, never here), when the task is an underwriting condition (conditions are signed off in the Loan Origination System), or when the task is not a Loan Application task.

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

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

| Input               | Type          | Description                                                                                                                                                                                                                                                                                        |
| ------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `taskId`            | string (uuid) | REQUIRED. The id of the task to move, as returned by get\_loan\_application\_user\_tasks or get\_loan\_application\_borrower\_tasks.                                                                                                                                                               |
| `status`            | string        | REQUIRED. InProgress, Complete or Requested.                                                                                                                                                                                                                                                       |
| `externalId`        | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored. |
| `loanApplicationId` | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                         |

## update\_loan\_application\_task

Deprecated, use update\_loan\_condition. This tool still works; planned removal 2027-01-31. Change an existing loan application task: rename it, reword its instructions, make it required or not, reassign it to an internal user (assignedToUserId, from get\_assignable\_users) or to a borrower, set or clear its due date, or re-file it under a different task item. Identify the loan by its MLM ExternalId (preferred) or its internal Henge GUID and the task by taskId from get\_loan\_application\_user\_tasks or get\_loan\_application\_borrower\_tasks. THIS IS A WRITE THE BORROWER SEES: renaming a borrower task changes what the borrower reads in their portal, and moving a task between a user and a borrower moves it between their to-do lists. Send ONLY the fields you want to change; a field you omit keeps its current value, and a field you send as null is cleared. This tool does not touch the task's condition link: to link, move or unlink it from an underwriting condition, use set\_loan\_task\_condition. To change its status, use set\_loan\_task\_status. Returns the task's id and timestamps. Rejected when taskId is missing, when no field is supplied, when the task is an underwriting condition, when assignedToUserId and an assignedToBorrowerId value are both sent, or when the assignee is not assignable on the loan.

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

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

| Input                  | Type          | Description                                                                                                                                                                                                                                                                                                                                                                 |
| ---------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `taskId`               | string (uuid) | REQUIRED. The id of the task to change, as returned by get\_loan\_application\_user\_tasks, get\_loan\_application\_borrower\_tasks or get\_loan\_application\_conditions.                                                                                                                                                                                                  |
| `name`                 | any           | New task name, up to 1024 characters. null clears it; omit to leave unchanged.                                                                                                                                                                                                                                                                                              |
| `description`          | any           | New instructions shown under the task name, up to 1024 characters. null clears them; omit to leave unchanged.                                                                                                                                                                                                                                                               |
| `isRequired`           | any           | Whether the task must be completed before the file can move forward. true or false to set it; null is treated as false. Omit to leave unchanged.                                                                                                                                                                                                                            |
| `assignedToBorrowerId` | any           | Reassign the task to a different borrower on the loan, by the borrowerId from get\_loan\_application. null addresses it to the loan's borrowers generally; omit to leave unchanged.                                                                                                                                                                                         |
| `assignedToUserId`     | any           | Reassign the task to an internal user (loan officer, processor) by their userId, which makes it a USER task. The user must be one get\_assignable\_users returns for this loan. null takes it off the internal user and makes it a borrower task again (addressed by assignedToBorrowerId); omit to leave unchanged. Cannot be combined with an assignedToBorrowerId value. |
| `dueDate`              | any           | The date the task is due, as yyyy-MM-dd. null clears it; omit to leave unchanged.                                                                                                                                                                                                                                                                                           |
| `itemCode`             | any           | Re-file the task under a different task item, by the code from get\_loan\_task\_items. null clears the item; omit to leave unchanged. 'Condition' is rejected.                                                                                                                                                                                                              |
| `requestedStartDate`   | string (date) | TransactionHistory tasks only: the new first day of the requested period, as yyyy-MM-dd, on or before the end date. Omit to leave unchanged; the period cannot be cleared.                                                                                                                                                                                                  |
| `requestedEndDate`     | string (date) | TransactionHistory tasks only: the new last day of the requested period, as yyyy-MM-dd, not in the future. Omit to leave unchanged; the period cannot be cleared.                                                                                                                                                                                                           |
| `notifyOnStatusChange` | boolean       | Subscribe (true) or unsubscribe (false) yourself from this task's status-change emails. Omit to leave your subscription as it is.                                                                                                                                                                                                                                           |
| `externalId`           | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored.                                                                          |
| `loanApplicationId`    | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                                                                                                  |

## update\_loan\_condition

Change a condition and its requests. The condition's own fields (Admin and Processor only): its name (the short title its row shows in Henge, kept here only, so a call that changes only the name writes nothing to the LOS), its text (which does not change the name), category, due date, visibility or required document type (documentTypeId from get\_loan\_document\_types, which replaces the current one; it cannot be cleared). Written to the LOS, or kept in Henge while the loan has not been submitted; the id does not change when the loan is submitted. Its requests (every role that may create a task): assignedToUserId or assignedToBorrowerId reassigns them, and status moves them to Requested, InProgress, Complete, Accepted or Rejected. Accepted and Rejected review the document a request holds exactly as accept\_loan\_document and reject\_loan\_document do (Admin, Processor, CompanyAdmin, Assistant and ConciergeKey; rejecting needs rejectionReasonId from get\_loan\_document\_rejection\_reasons), and a condition whose requests are all accepted is cleared in the LOS. taskId narrows assignee and status to one request. Identify the loan by its MLM ExternalId (preferred) or internal GUID and the condition by conditionTaskId from get\_loan\_conditions. Send ONLY the fields you want to change; anything omitted keeps its current value, and omitting isHidden never changes visibility. THIS WRITES TO THE LOS for a condition already there. Changing the description is safe and renames the condition in place - it does not create a second one. This is NOT the tool for two neighbouring jobs: to add an internal note use add\_loan\_condition\_internal\_note, which appends with an author stamp; to reword a condition for Henge readers only while the LOS keeps the underwriter's original wording, use update\_loan\_condition\_text. An entry is written to the loan's activity log.

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

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

| Input                  | Type          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ---------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `conditionTaskId`      | string (uuid) | REQUIRED. The condition's id, as returned by get\_loan\_conditions or create\_loan\_condition. It is the same id before and after the loan is submitted.                                                                                                                                                                                                                                                                                                                                                               |
| `name`                 | string        | New short name: the title people see in the loan's condition list (name in get\_loan\_application\_conditions), at most 100 characters. Omit to leave the name unchanged. Kept in Henge only, so a call that changes just the name writes nothing to the LOS. A change of description does not rename the condition: send a new name with it when what the condition asks for changes.                                                                                                                                 |
| `taskId`               | string (uuid) | Narrows assignedToUserId, assignedToBorrowerId and status to one request under the condition, by the id get\_loan\_conditions lists under it. Omit to change every request under the condition (accepting changes every request holding a document; rejecting needs taskId when more than one holds one).                                                                                                                                                                                                              |
| `assignedToUserId`     | string (uuid) | Reassign the requests under the condition to an internal user by userId, one that get\_assignable\_users returns for this loan; they become staff work items. Cannot be combined with assignedToBorrowerId.                                                                                                                                                                                                                                                                                                            |
| `assignedToBorrowerId` | string (uuid) | Address the requests under the condition to one borrower on the loan, by the borrowerId from get\_loan\_application; they become borrower requests again. Cannot be combined with assignedToUserId.                                                                                                                                                                                                                                                                                                                    |
| `status`               | string        | Move the requests under the condition to Requested, InProgress, Complete, Accepted or Rejected. Accepted and Rejected review the document a request holds exactly as accept\_loan\_document and reject\_loan\_document do (Admin, Processor, CompanyAdmin, Assistant and ConciergeKey only), and a condition whose requests are all accepted is cleared in the LOS. Requested, InProgress and Complete run what set\_loan\_task\_status runs and apply to Loan Application tasks only. Omit to leave the status alone. |
| `rejectionReasonId`    | string (uuid) | REQUIRED with status Rejected: a reason id from get\_loan\_document\_rejection\_reasons.                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `rejectionComment`     | string        | With status Rejected: a comment for the borrower saying what is wrong with the document.                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `description`          | string        | New condition text, which renames the condition. Written to the LOS, or kept in Henge while the loan has not been submitted. Admin and Processor only. Omit to leave the wording unchanged. Safe to change: the LOS identifies a condition by its identifier, so this renames the condition in place rather than creating a second one.                                                                                                                                                                                |
| `category`             | string        | New category. Must be one of the values get\_loan\_condition\_categories returns; anything else is refused. Omit to leave the category unchanged.                                                                                                                                                                                                                                                                                                                                                                      |
| `dueDate`              | string (date) | New due date, as yyyy-MM-dd. Omit to leave the due date unchanged.                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `isHidden`             | boolean       | Change whether the condition is hidden from the borrower. A hidden condition stays visible to Admin, CompanyAdmin, Processor and the loan officer (Agent, DualLicensedAgent, ConciergeKey). OMITTING THIS LEAVES THE CURRENT VISIBILITY ALONE - an update never changes visibility by accident.                                                                                                                                                                                                                        |
| `documentTypeId`       | string (uuid) | Change the document the condition asks for: a document type id from get\_loan\_document\_types. This REPLACES the current one (a condition has exactly one). Omit to leave it unchanged. It cannot be removed, only replaced.                                                                                                                                                                                                                                                                                          |
| `pairIndex`            | integer       | Which borrower pair the condition belongs to, by pair index (0 is the primary pair): a client on a loan with several pairs then reads it only as that pair. Henge only, never sent to the LOS. Send it, or appliesToAllPairs, on its own to change the pair without touching the LOS. Omit to leave the pair as it is.                                                                                                                                                                                                 |
| `appliesToAllPairs`    | boolean       | True makes the condition a whole-loan one that every pair reads. False with no pairIndex clears the pair, and it is worked out again from the borrower named on the condition. Henge only, never sent to the LOS. Omit to leave it as it is.                                                                                                                                                                                                                                                                           |
| `externalId`           | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored.                                                                                                                                                                                                                     |
| `loanApplicationId`    | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                                                                                                                                                                                                                                             |

## update\_loan\_condition\_text

Reword an underwriting condition for the people working the loan, or revert it to the original wording. Identify the loan by its MLM ExternalId (preferred) or its internal Henge GUID and the condition by conditionTaskId from get\_loan\_application\_conditions. The rewording is LOCAL ONLY: the Loan Origination System keeps its own wording and is never written to, and the rewording survives the condition sync. Send text as an empty string or null to revert to the Loan Origination System's wording. Returns the condition's displayed text and, while a rewording is in effect, the original. Rejected when conditionTaskId is missing or is not a condition on the loan.

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

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

| Input               | Type          | Description                                                                                                                                                                                                                                                                                        |
| ------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `conditionTaskId`   | string (uuid) | REQUIRED. The condition's task id, as returned by get\_loan\_application\_conditions.                                                                                                                                                                                                              |
| `text`              | string        | The condition reworded for the people working the loan. Send an empty string or null to revert to the Loan Origination System's wording.                                                                                                                                                           |
| `externalId`        | string        | PREFERRED when available. The MLM ExternalId of the loan (string, up to 108 chars). Use this whenever the loan already exists in MLM — it is the stable identifier humans see in MLM UIs and is what webhooks surface. If both ids are supplied, externalId wins and loanApplicationId is ignored. |
| `loanApplicationId` | string (uuid) | Fallback identifier: the Henge internal loan application ID (GUID). Use this only when no externalId is known — typically because the loan has not yet been pushed to MLM.                                                                                                                         |


---

# 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/conditions.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.
