Reading the Catalog
- R / W — Read tools are safe to call repeatedly. Write tools mutate state and should be gated behind human confirmation in agent workflows.
- Parameters — only the notable ones are listed. Most list tools accept
limit,offset, andsortas well. - Enums — all enum values are lowercase on the wire. The server lowercases user input automatically, but prompt enums in lowercase to reduce model errors.
- Related REST page — links to the matching reference in the Lev API docs for full schema.
Deals
| Tool | Type | Description |
|---|---|---|
list_deals | R | Search deals. Filters: loan_type, transaction_type, business_plan, min_loan_amount, max_loan_amount, archived. See Deals. |
get_deal | R | Fetch a deal with optional include for financials, properties, team; the response also reports the deal's archived state. Takes deal_id. |
summarize_deal | R | Narrative deal snapshot at three detail levels (brief, standard, memo). Takes deal_id and optional detail. Consolidates get_deal, search_deal_index, list_term_sheets, and list_placements into prose for chat surfaces; quantitative claims cite their source document. Flags archived deals and labels the pipeline stage as the last stage when archived. The memo detail level is a 1-pager in chat, not a generated file — PowerPoint and Word documents use generate_deal_memo, and Excel models use generate_deal_underwriting_model. |
show_deal | R | Visual overview of one deal, an interactive card of its headline terms, property, pipeline stage, an archived badge when archived, key financials, team, and indexed facts. Takes deal_id. Renders inline on MCP Apps hosts; other hosts get a compact text summary. Use for "show me / pull up / open the deal". For a written narrative use summarize_deal; for raw CRM fields, get_deal; for one metric or its source, search_deal_index. |
search_deal_index | R | Search indexed canonical deal facts for a specific question. Takes deal_id, context and/or sot_ids, optional min_score, limit, and include_signed_urls. Each hit includes sidebarNodeId (portal ?node=) copied to citation node when present. Visibility: user-facing. See search_deal_index and Search Index. |
list_deal_index_taxonomy | R | Return the Deal Index sidebar navtree. Takes deal_id plus optional include node-type filter. Prefer sidebarNodeId on a search_deal_index hit; walk this tree only as a backup. Visibility: user-facing. See list_deal_index_taxonomy and Index taxonomy. |
list_deal_index_observations | R | Inspect every value extracted from documents for a single deal fact. Takes deal_id plus sot_id (preferred, from a prior search_deal_index result) or metric_id. Use to show provenance, pick among candidate values, or prepare an observation_id for update_deal_index_fact. See Index Observations. |
update_deal_index_fact | W | Change a deal fact's canonical value. Takes deal_id, sot_id, and exactly one of value (free-text replacement) or observation_id (promote an extracted value — preserves source provenance). Server-side editability is enforced; non-editable metrics return a clear error. See Update Index Fact. |
list_deal_index_metric_definitions | R | List the metrics that can be recorded on a deal, each with a suggested_write_via routing hint. Takes deal_id plus optional metric_label, category_id, limit, offset. Use to discover what's recordable before record_deal_facts. See Metric Definitions. |
record_deal_facts | W | Record one or more user-supplied metric values on a deal (NOI, occupancy, valuation, etc.). Takes deal_id and values — each a metric_id plus value, with optional entity_ref from GET /index/entities. If the same metric/entity already has a canonical value, this appends a user-input observation; Lev's promotion logic decides the displayed value. To correct one specific value, use update_deal_index_fact instead. See Insert Index Facts. |
list_deal_memos | R | List a deal's memos (AI-generated deal books) — both published and draft, most recently active first. Takes deal_id plus optional filters — status (published/draft), search (title substring), memo_type, pdf_ready — and vault_id, limit (default 20), and offset. Spans every vault by default; pass vault_id (from list_deal_vaults) to list only one vault's memos. Returns each memo's uuid, title, type, status (published/draft), published date, last-modified date, creator ({id, name}), pdf_ready flag, and the vaults it lives in; no PDF link (use get_deal_memo). Never creates a file — existing PDF memos stay on this tool and get_deal_memo (memo_id); new PowerPoint, Word, and Excel runs use the Office generate tools. See List Memos. |
get_deal_memo | R | Fetch one memo for a deal with its creator, last-modified date, the vaults it lives in, and a ready-to-click PDF link. Takes deal_id, memo_id (the memo's uuid), and optional quality (original default, or high/medium/low). Unrendered drafts have no PDF (pdf_ready: false). Lists existing legacy deal-book PDFs; it never creates one. See Get Memo. |
generate_deal_memo | W | Start Lev’s unified memo agent to build a memo, credit memo, IC memo, OM, BOV, deal book, or deck. Takes deal_id (from list_deals) and message (your request, max 1,000 characters). The template selected in the card determines PowerPoint or Word output. Returns office_session_id and run_id and opens the shared Office card on MCP Apps hosts. Spends credits; each call starts a new run. Visibility: user-facing. See generate_deal_memo. |
generate_deal_underwriting_model | W | Start Lev's underwriting team to build an Excel model, pro forma, or debt-sizing workbook. Takes deal_id and message (max 1,000 characters). Returns office_session_id and run_id and opens the same Office card. Spends credits; each call starts a new run. Visibility: user-facing. See generate_deal_underwriting_model. |
view_deal_office_document | R | Reopen the Office card for a PowerPoint, Word, or Excel run started earlier in the conversation. Takes office_session_id and run_id from a prior generate result. Does not start a new run. Visibility: user-facing. See view_deal_office_document. |
create_deal | W | Create a new deal. Requires title. Optional deal fields: loan_amount, loan_type, transaction_type, business_plan, description, estimated_close_date, sponsor_private_company_id. Optional financial fields: purchase_price, estimated_value, total_cost, total_cost_basis, land_cost. |
update_deal | W | Update deal fields and canonical deal-level financials. Takes deal_id plus fields to change. Financial fields: purchase_price, estimated_value, total_cost, total_cost_basis, land_cost. |
delete_deal | W | Soft delete a deal. Takes deal_id. |
move_deal_to_pipeline_status | W | Move a deal to a specific pipeline status. Takes deal_id, pipeline_id, pipeline_status_id. |
Enums
loan_type:construction,heavy_bridge,light_bridge,permanent,land,predevelopment,tbdtransaction_type:acquisition,refinance,new_construction,tbdbusiness_plan:stabilized,value_add,construction,land
Related REST pages: Deals, Pipelines, Search Index, Index taxonomy. The Office generate tools have no REST equivalent — they start Cortex agent runs (memo, underwriting-model-team).
Documents and Vaults
| Tool | Type | Description |
|---|---|---|
list_deal_vaults | R | List a deal's vaults — its shared Deal Rooms (datarooms) and its private Resources area. Takes deal_id. Returns each vault's title, whether it is the deal's primary Deal Room, and its document count. These are the containers, not the files — use list_deal_documents for the files inside. |
list_deal_documents | R | Browse the files uploaded to a deal, across its Resources area and any Deal Rooms. Takes deal_id plus optional search, extension, folder_id, vault_id (from list_deal_vaults), limit, cursor. Returns file metadata only — no download links. On a broad "what documents/files are on this deal" ask, also call list_deal_memos so uploaded files and generated deal books appear together. |
get_deal_document | R | Fetch one uploaded document, including a clickable, short-lived download link. Takes deal_id and document_id. Use after list_deal_documents to open or download a specific file; use get_deal_memo instead for generated memo / deal-book PDFs. |
browse_deal_vaults | R | Open a deal's document workspace — an inline browser of every vault with the documents and memos inside. Takes deal_id. Renders an interactive vault browser on MCP Apps hosts; other hosts get a summary with per-vault counts. For just the list of vaults use list_deal_vaults; for a plain document list, list_deal_documents. |
get_deal_checklist | R | Read a deal's diligence checklists — what is still outstanding, requested, reviewing, or completed in each Deal Room. Takes deal_id plus optional vault_id (a Deal Room from list_deal_vaults). Returns one checklist per Deal Room, each with its sections and tasks; tasks expose status, assignees, expected document_types (id, name), and linked files (document_id, vault_resource_id, name, origin). This is the deal's to-do / request list, not its files — use list_deal_documents for uploaded files. See List Checklists. |
create_checklist_task | W | Add a task to a deal's checklist — a document request or to-do. Anchor it under exactly one of section_id, checklist_id, or parent_task_id (ids from get_deal_checklist). Optional description, status, assigned_user_id (from list_team_members), due_date, document_type_ids. To comment on a task use create_note; to mark one done use complete_checklist_task. See Create Checklist Task. |
update_checklist_task | W | Edit an existing checklist task — retitle, re-status, reassign, set a due_date, or reopen it (is_completed=false). Takes task_id from get_deal_checklist and sends only the fields you pass. To mark a task done use complete_checklist_task, not this. See Update Checklist Task. |
complete_checklist_task | W | Mark a checklist task done — checks it off and approves any files already attached to it. Takes task_id from get_deal_checklist. Reopen with update_checklist_task (is_completed=false). See Complete Checklist Task. |
Enum — checklist task status (get_deal_checklist returns it; create_checklist_task and update_checklist_task accept it): to_do, requested, reviewing, updates_needed, approved, cancelled.
To customers, "vaults" usually means the shared Deal Rooms; every deal also has one private Resources area for its own working files. When naming a vault, use its title (the Resources area shows as Deal Resources), never the raw type value.
Contacts
| Tool | Type | Description |
|---|---|---|
list_contacts | R | Search contacts. Filters: contact_type, email, first_name, last_name. |
get_contact | R | Fetch a contact by contact_id. |
create_contact | W | Create a contact linked to a company. Requires company_id, contact_type, first_name, last_name. |
update_contact | W | Update any contact field. Takes contact_id plus fields to change. |
unlock_contact | W | Reveal a masked lender contact — full name, email, phone. Takes the contact_id (never a placement id), spends about 200 credits, and is irreversible, so confirm the cost with the user first. Reveals a contact that Lev's AI match attached to a placement and left masked; an already-revealed or connected contact reads free through get_contact. Idempotent — re-running on an already-unlocked contact returns it without a second charge. See Unlock Contact. |
Enum — contact_type: lender_contact, sponsor.
Related REST page: Contacts.
Companies
| Tool | Type | Description |
|---|---|---|
list_companies | R | Search private companies (lenders, sponsors). Filters: name, state, city. |
get_company | R | Fetch a company by company_id. |
create_company | W | Create a company. Requires name and company_type. Optional: website, city, state, and org_id to link the company to a directory lender, using the id from search_lenders or the org_id from get_lender_recommendations (both are the lender's organization ID). |
update_company | W | Update any company field. Takes company_id plus fields to change. |
Enum — company_type: lender, sponsor.
Related REST page: Companies.
Notes
| Tool | Type | Description |
|---|---|---|
list_notes | R | Read free-text notes (call logs, relationship context) logged on a contact, deal, placement, or company — or the comment thread on a checklist task. Requires parent_type and parent_id; optional limit, cursor. For structured underwriting facts use search_deal_index instead — notes are human commentary, not indexed facts. |
create_note | W | Log a free-text note on a contact, deal, placement, or company — or post a comment on a checklist task. Requires parent_type, parent_id, and non-empty text. To record a structured deal fact, use record_deal_facts instead. |
update_note | W | Edit the text of a note. Requires parent_type, parent_id, note_id, and replacement text. You can only edit a note you created. |
delete_note | W | Permanently delete a note (hard delete, no undo). Requires parent_type, parent_id, note_id. You can only delete a note you created. |
Enum — parent_type: contact, deal, placement, company, checklist_task.
Use checklist_task to read or post the borrower-portal comments on a diligence item (for example, a document request) — the same comments your team and the borrower see and post in the portal.
Related REST pages: Contacts, Deals, Placements, Companies, Checklist tasks.
Lenders
| Tool | Type | Description |
|---|---|---|
search_lenders | R | Find a lender in Lev's directory by name and get the lender_id that get_lender takes. Requires name (partial, case-insensitive); optional limit (1-25, default 25). Returns up to limit best matches, best first, with no paging. When 25 or more lenders match, at most 20 come back. Each result carries id, name, city, state, and lender_type. Costs no credits, but each call counts toward the account's daily lender directory cap (30 a day by default). It searches Lev's whole directory, not the companies in your account (use list_companies for those). To open outreach, call create_company with the search result's name, company_type set to lender, and the search result's id as org_id, then pass the new company's id to create_placement. |
get_lender | R | Fetch a lender's directory profile by lender_id: name, website, address, city, state, ZIP, lender type, and description. No program data. Each call counts toward the account's daily lender detail cap (100 a day by default). Useful when a lender_id surfaces from search_lenders, placements, term sheets, or companies. |
recommend_lenders_for_deal | W | Run Lev's AI lender match for a deal — ranks the lenders most likely to finance it. Takes deal_id and spends about 2,000 credits, so confirm the cost with the user first; called without confirmation it previews the cost and charges nothing. Matching runs in the background — read the ranked lenders with get_lender_recommendations. The deal needs a geocoded property and loan expectations set to be search-eligible. |
get_lender_recommendations | R | Read the ranked lenders from a deal's AI match. Takes deal_id, paginated (limit defaults to 10, capped at 25; offset). Each result carries the lender org_id, an ai_score, the match reasoning, and relevant loan programs. Materialize one into a company with create_company — pass the recommendation's organization_name as name, set company_type to lender, and pass its org_id — then open outreach with create_placement. |
Related REST pages: Lender Directory.
Placements
| Tool | Type | Description |
|---|---|---|
list_placements | R | Search lender placements (outreach). Filters: deal_id, status, lender_status, visibility, contact_id, private_company_id, plus min_created_at/max_created_at and min_updated_at/max_updated_at range filters. Sort: status, score, created_at, updated_at (prefix - for descending). |
get_placement | R | Fetch a placement by placement_id with match score and metadata. When Lev's AI match has attached a recommended contact, the contact_id is present but its identity stays masked (contact_name is null) until you reveal it with unlock_contact. |
create_placement | W | Open lender outreach on a deal. Requires deal_id and private_company_id. Optional contact_id, status, visibility, description, score, outreach_date, lender_status. Cannot create with status="archived". Omit contact_id and Lev may run AI contact-matching in the background: poll get_placement for the matched contact_id, then reveal it with unlock_contact. See Create Placement. |
update_placement | W | Update a placement. Takes placement_id plus any of status, visibility, description, score, outreach_date, lender_status. Use status="archived" to remove (no DELETE verb). deal_id, private_company_id, and contact_id are locked at create time. See Update Placement. |
Enums
status:new,sent,lender_reviewing,terms_received,term_sheet_received,executed_ts_in_closing,closed,unresponsive,willing_to_negotiate,lender_passed,archived,carve_out,carve_out_closedlender_status:origination,new,lead_qualification,quotation,negotiation,offer,term_sheet,good_faith_deposit,diligence,in_closing,closed,archivedvisibility:hidden,masked,shared
archived is reserved for update_placement and cannot be sent to create_placement.
Related REST page: Placements.
Pipelines
| Tool | Type | Description |
|---|---|---|
list_pipelines | R | Fetch all pipelines with their statuses. No parameters. |
summarize_pipeline | R | Narrative pipeline snapshot at three detail levels (brief, standard, memo). Takes optional pipeline_id (defaults to the lowest-order pipeline) and detail. Aggregates stages, per-stage deal counts, loan totals, and highlighted deals (stuck longest, closing soon) into prose. |
To read a deal's current pipeline status, call get_deal with include=pipelines (the default) — each deal returns up to 10 current pipeline rows, each including pipeline_id, status_name, and updated_at.
Related REST page: Pipelines.
Term Sheets
| Tool | Type | Description |
|---|---|---|
list_term_sheets | R | Fetch loan quotes for a deal. Takes deal_id. |
get_term_sheet | R | Fetch a full term sheet with rates, fees, and terms. Takes deal_id and term_sheet_id. |
summarize_term_sheets | R | Narrative comparison of all term sheets on a deal at three detail levels (brief, standard, memo). Takes deal_id and optional detail. Computes the lowest-rate and lowest all-in-cost leaders and surfaces rate, fee, and term tradeoffs. |
create_term_sheet | W | Record a lender quote against a placement. Requires deal_id, placement_id, total_rate, initial_funding, quote_type, and rate_type. Many optional fields for fees, recourse, DSCR/debt yield, extension options, etc. See Create Term Sheet. |
update_term_sheet | W | Revise a term sheet. Takes deal_id and term_sheet_id plus any field to change. placement_id and deal_id are locked. Omitted arguments stay unchanged; the MCP wrapper does not forward explicit nulls, so the REST null-clearing behavior for base_rate and the non-nullable boolean 422s are reachable through the REST API only. See Update Term Sheet. |
delete_term_sheet | W | Soft-delete a term sheet (reversible by Lev support). Takes deal_id and term_sheet_id. See Delete Term Sheet. |
For term-sheet rates, total_rate is the spread when the term sheet has a benchmark base_rate. It is the all-in fixed rate only when the resulting term sheet has no benchmark (base_rate is null or none-fixed). For create calls, omitting base_rate creates a no-benchmark quote. For update calls, omitted arguments stay unchanged. For base-rate quotes, calculate all-in rate as base_rate_value + total_rate when both values are present.
Enums
quote_type:guidance,indication,soft_quote,hard_quote,term_sheetrate_type:fixed,floatingrecourse:personal_recourse,fund_corporate_recourse,non_recourserecourse_type:full,partial,burn_offfloor_type:base_rate,total_rateprepayment_penalty:step_down,defeasance,minimum_interest,yield_maintenance,minimum_multiple,swap_breakage,no_prepayment_penalty,no_ability_to_prepay,flat_fee,otherpayment_method:accrued,partial,current_paycapital_source_type:balance_sheet,agency,cmbs_clo,warehouse,sbabase_rate: either an enum key (e.g.treasury_y5,sofr_m1,prime_rate) or the matching display value fromget_base_rates(e.g.Treasury 5-Yr,SOFR 30-Day Avg,Prime Rate). Use the literalnone-fixedfor fixed-rate quotes with no underlying benchmark. When you use a real base-rate value, sendtotal_rateas the spread over that base rate
Related REST page: Term Sheets.
Market Data
| Tool | Type | Description |
|---|---|---|
get_base_rates | R | Current SOFR, Prime, Treasury rates. Cached ~30 minutes. No parameters. |
get_asset_types | R | Property asset type classifications (Office, Multifamily, Industrial, Retail, Hotel, Self-Storage, ...). No parameters. |
Related REST page: Market Data.
Account
| Tool | Type | Description |
|---|---|---|
get_my_profile | R | Returns user, active account, available accounts, subscription, granted scopes. Call this first to confirm the connection. |
list_team_members | R | Fetch team members in the active account. |
list_available_accounts | R | Fetch accounts the user can switch to. |
switch_account | W | Pin the MCP session to a specific account by name or slug (fuzzy matched). |
See MCP Authentication for how account context propagates across tool calls.
Related REST page: Account & Team.
Billing
| Tool | Type | Description |
|---|---|---|
get_my_billing_summary | R | Fetch the active account's subscription metadata and credit balance. Use before workflows that may consume credits. |
Related REST page: Billing.
search_deal_index
Purpose. Retrieve ranked canonical Index / Metric SOT facts for one deal and question, with source-file provenance. Use for "what's the NOI / occupancy / DSCR", "where did this number come from", and the first step to correct a fact. Also exact-looks-up current values by prefixed sot_ids (the citation URL sotId) without a semantic context.
Visibility: user-facing. Registered MCP tool. Wraps POST /api/external/v2/deals/{deal_id}/index/search. End users and models call it.
Auth / scopes. MCP OAuth (signed-in Lev user). Downstream REST requires deals:read. The server does not elevate privileges.
Params / inputs
deal_id(integer, required) — the deal to search.context(string, optional) — natural-language search phrase. Required whensot_idsis omitted.sot_ids(string[], optional) — prefixed ids from a prior search or citation URLsotId(d:123,a:17544:property:2561). Send only prefixed ids; strip blanks before sending. When set, embeddings are skipped. At least one ofcontextorsot_idsis required.min_score(number, default0.3) — similarity threshold from 0 to 1. Ignored on exact lookup.limit(integer, default20) — clamped to 1–200.include_signed_urls(boolean, defaultfalse) — when true, document-backed sources may include short-lived links; the wrapper converts them tosource.file_linkMarkdown and omits rawsource.signed_url.
Response shape / outputs. JSON string with deal_index_results, plus total, showing, and has_more. Each row includes metric/value fields, score, source, editable (hint only), and:
sidebar_node_id/sidebarNodeId— the portal?node=value when the backend returned a non-empty id.node— copy of that id for citation URLs. Omitted whensidebarNodeIdis null, empty, missing, or the literal"None"sentinel. Do not inventnodefromcategory_idorentity_ref.
{
"deal_index_results": [
{
"id": "d:5362",
"sot_id": "d:5362",
"metric_key": "deal_financials.in_place_noi",
"metric_label": "In-place NOI",
"value_text": "$1,250,000",
"category_id": 5,
"entity_ref": "property:690",
"sidebar_node_id": "sub-1",
"sidebarNodeId": "sub-1",
"node": "sub-1",
"score": 0.87,
"source": {
"type": "document",
"file_name": "appraisal.pdf",
"pages": [3, 12]
}
}
],
"total": 1,
"showing": 1,
"has_more": false
}Citation URL when sidebarNodeId is present: {PORTAL}/{slug}/deals/{dealId}/data?sotId={prefixedId}&instanceId={unique}&node={sidebarNodeId}. Omit node when it is absent.
See Search Index.
list_deal_index_taxonomy
Purpose. Return the Deal Index sidebar navtree so a citation URL can open the matching Index section. Does not return facts — use search_deal_index for values and sources.
Visibility: user-facing. Registered MCP tool. Wraps GET /api/external/v2/deals/{deal_id}/index/taxonomy. Prefer sidebarNodeId on the search hit; this tree is the backup walk.
Auth / scopes. MCP OAuth (signed-in Lev user). Downstream REST requires deals:read.
Params / inputs
deal_id(integer, required).include(string[], optional) — repeatable node-type filter:CATEGORY,SUB_CATEGORY,METRIC_GROUP,ENTITY_GROUP. Omit for the full tree.
Response shape / outputs. JSON string with taxonomy_nodes. Use a node's id as the portal ?node= only for selectable rows (SUB_CATEGORY, ENTITY_GROUP, or a drilldown METRIC_GROUP). Never use a CATEGORY id as ?node=. A non-drilldown METRIC_GROUP should use its parent SUB_CATEGORY id. Pass nodes through. Do not invent a node if the walk misses.
{
"taxonomy_nodes": [
{
"id": "sub-1",
"parent_id": "eg-property-690",
"type": "SUB_CATEGORY",
"label": "NOI",
"category_id": 5,
"ref_id": null
}
],
"total": 1,
"showing": 1,
"has_more": false
}See Index taxonomy.
generate_deal_memo
Purpose. Create a memo, credit memo, IC or investment committee memo, OM, offering memorandum, BOV, deal book, presentation, deck, or pitch book for a deal. Lev’s unified memo agent builds an editable PowerPoint or Word document according to the template you select in the card, saves it to the deal’s Resources, and shows progress and setup questions there. Include any requested format in message; there is no separate format parameter or enforced default. Use generate_deal_underwriting_model for Excel models. Resolve the deal with list_deals, then call this once. Do not draft the document in chat.
Visibility: user-facing. Model-callable. Interactive setup and document preview require a client that supports MCP Apps. On those hosts the result mounts ui://cortex/office-flow/v1.html. Hosts without the card still receive the text instruction and structured payload (including pending questions) so they can relay status. There is no public REST create-memo endpoint behind this tool — it starts a Cortex memo agent run.
Auth / scopes. MCP OAuth (signed-in Lev user). The call runs as that user and account. Each call spends credits (destructiveHint is true, matching other credit-spending tools). Confirm the action with the user first. Disabled with HTTP 503 when Cortex is not configured on the server.
Params / inputs
message(string, required, max 1,000 characters) — the user's request in their words, including any audience, format, length, or focus you requested. Do not put deal facts or draft content here; the agent reads the deal.deal_id(integer, required) — positive deal id fromlist_deals.
Response shape / outputs. Structured content plus a leading instruction for the model (next_step). Includes:
office_session_id— Cortex session id. Argument name isoffice_session_id, neversession_id(Claude Desktop drops an argument namedsession_id).run_idstatus—continuing,paused,completed,failed,cancelled, orinterruptedcontinuation_statusquestions— pending setup questions whenstatusispausedsubmission_blocked_reasondetail
{
"next_step": "Lev's agent is building this file now. It appears in the card, and setup questions show up there. Tell the user it's underway. Do not draft the document or workbook in chat.",
"office_session_id": "sess_01JEXAMPLE",
"run_id": "run_01JEXAMPLE",
"status": "continuing",
"continuation_status": "running",
"questions": [],
"submission_blocked_reason": null,
"detail": "The document is still running."
}Each call starts a new document run. Reopen an earlier run with view_deal_office_document. Existing legacy deal-book PDFs stay on list_deal_memos / get_deal_memo (memo_id).
generate_deal_underwriting_model
Purpose. Build a new Excel underwriting model, pro forma, or debt-sizing workbook for a deal. Resolve the deal with list_deals. Lev's underwriting team gathers inputs and builds the XLSX. Pass the user's request, not a workbook drafted in chat. Setup and credit questions appear in the card. Use generate_deal_memo for PowerPoint or Word documents.
Visibility: user-facing. Model-callable. Interactive setup and document preview require a client that supports MCP Apps. On those hosts the result mounts the same ui://cortex/office-flow/v1.html card. There is no public REST equivalent — it starts a Cortex underwriting-model-team agent run.
Auth / scopes. MCP OAuth (signed-in Lev user). Each call starts new work and spends credits. Confirm the action with the user first. Disabled with HTTP 503 when Cortex is not configured.
Params / inputs
message(string, required, max 1,000 characters) — the user's request in their words. Do not put a drafted workbook here.deal_id(integer, required) — positive deal id fromlist_deals.
Response shape / outputs. Same public payload as generate_deal_memo. Reopen a known run with view_deal_office_document.
view_deal_office_document
Purpose. Reopen a PowerPoint, Word, or Excel generation card started earlier in this conversation — for example after a reload, or when the user asks to see it again. Pass office_session_id and run_id from the generation tool result. Generation tools already show the card. Does not start a new run and does not spend credits.
Visibility: user-facing. Model-callable. Same card (ui://cortex/office-flow/v1.html) and payload shape as the generate tools.
Auth / scopes. MCP OAuth (signed-in Lev user). Confirms the run belongs to that user and that office_session_id matches run_id.
Params / inputs
office_session_id(string, required) — from the generate result. Never namedsession_id.run_id(string, required) — from the same generate result. Both ids must belong to one run.
Response shape / outputs. Same public payload as generate_deal_memo. Mismatched ids return a validation error: office_session_id and run_id do not belong to the same Office run. Pass both from one generation result.
{
"next_step": "The document run completed. Tell the user; direct them to the card if this host supports it, otherwise explain that the card is unavailable here. Do not draft the document or workbook in chat.",
"office_session_id": "sess_01JEXAMPLE",
"run_id": "run_01JEXAMPLE",
"status": "completed",
"continuation_status": null,
"questions": [],
"submission_blocked_reason": null,
"detail": "The document run completed."
}Response Shape
Every tool returns a JSON string. The shape depends on the operation.
List tools
{
"deals": [ { "id": 101, "title": "..." }, { "id": 102, "title": "..." } ],
"total": 237,
"showing": 20,
"has_more": true
}Detail tools
{
"deal": { "id": 101, "title": "...", "loan_amount": 12500000 }
}Write tools
{
"message": "Deal created successfully",
"deal": { "id": 103, "title": "..." }
}Errors
Errors are returned as plain strings, never as raised exceptions. Common patterns include "Validation failed: loan_amount must be greater than 0" or "Deal not found: 101". See MCP Errors & Limits for the full convention.