Generate LBO Workbook (xlsx)
generate_lbo_xlsxRender an LBO result into a professional Excel workbook (Summary + year-by-year Projection table + Inputs sheet). Returns a 15-minute presigned R2 download URL.
SERVER-TRUST: the deal is re-derived in-Worker from the supplied lbo_result.inputs_echo (the math is pure + deterministic) and the workbook renders Valuein's recomputed figures — never the caller's claimed values. If the claimed figures disagree, the workbook is still produced but stamped with a visible correction banner and the response verification.status is 'corrected'.
Pair with compute_lbo for a typical flow: agent calls compute_lbo({ticker, ...}), then passes the structured result straight to generate_lbo_xlsx({ticker, lbo_result, ...}) to materialise a shareable file.
Tier: pro+.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticker | Yes | Stock ticker symbol of the LBO target, e.g. AAPL. | |
| lbo_result | Yes | Structured LBO result — typically the `result` field returned by `compute_lbo`. | |
| company_name | No | Optional — surfaces on the cover row. Falls back to ticker only. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| _meta | Yes | Provenance envelope — data lineage for every MCP response | |
| r2_key | Yes | ||
| filename | Yes | ||
| expires_at | Yes | ||
| size_bytes | Yes | ||
| content_type | Yes | ||
| verification | Yes | Server-trust record. status='verified' when the caller's figures matched the server re-derivation; 'corrected' when they did not (the workbook shows the SERVER figures + a banner). `mismatches` lists every field that disagreed. | |
| expires_in_seconds | Yes |