Skip to content
MirrorFirm

How does facility booking map onto environment state and tool actions?

A practical mapping from booking steps to tool calls, state tables and reset behaviour, so an environment team can see how the workflow becomes an interface.

A booking environment usually exposes a small set of read and write tools over linked tables.

**Read tools**

- `get_approval(approval_id)` returns amount, term, margin, repayment frequency and conditions. - `get_security(collateral_id)` returns the interest type and status. - `list_conditions(approval_id)` returns each condition with a status and evidence reference.

**Write tools**

- `create_facility(approval_id, terms)` creates a draft facility. - `link_security(facility_id, collateral_id)` attaches the security record. - `enable_drawdown(facility_id)` fails unless preconditions hold. - `generate_schedule(facility_id)` produces instalment rows. - `raise_exception(facility_id, reason_code, owner_role)` returns the file to a named role.

**State tables**

`approvals`, `conditions`, `facilities`, `security_interests`, `schedules`, `ledger_entries` and `exceptions`, joined by `approval_id`, `facility_id` and `collateral_id`.

**Reset**

Each episode starts from a seeded snapshot, so the same task id always produces the same starting records. Mid-episode events, such as an approval amendment, are scheduled by step number and replayed identically on reset.

The exact tool names and schemas are agreed during scoping, so they can match the harness you already run.

The workflow translates into a small, well-bounded tool surface over linked tables, which is straightforward to wire into an existing harness.

Audience:
Environment builders
Content type:
Integration
Buyer question:
What it is and why it matters

Content release: r-a220eb6e099b243b

More on Loan booking