Export to file
layerz_exportGenerates a file from a model and returns { download_url, filename, size, file_id, expires_at }. target: 'model' (default) is the Excel workbook (the same export as the web app: Intro + per-section sheets, native charts and dashboards, live formulas), plus structure_hash / values_hash; when the model has branches, the statements and single-value widgets follow branch_id (default: the base branch) while dashboards keep every branch they break down by. target: 'transactions' is the full staged import of the data source source_id as a CSV file (no filters, no routing annotations), plus row_count. Each call persists a new private file in Storage, where the file and its signed download_url expire after 24h; the model itself is not modified, so the tool stays available to read-only keys, off quota.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "layerz_export"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | model (default): the Excel workbook of the model. transactions: the staged import of `source_id` as a CSV file. | |
| model_id | No | Target model UUID. Required for user-scoped API keys; validated against the bound model for model-scoped keys. | |
| branch_id | No | target model only. Branch the statements and single-value widgets follow (default: the base branch). Dashboards keep every branch. | |
| source_id | No | target transactions only (required there). Data source id as returned by layerz_list_integrations. |