Parse uploaded file
layerz_parse_fileParses an uploaded Excel/CSV (file_id) deterministically and returns a token-optimized structure: sheet summaries (without sheet_name) or, for one sheet, the detected timeline, suggested_structure (layout, header row, columns), row labels and column headers with samples. A wide sheet is recognised by its period header: a run of at least three consecutive periods (bare years such as 2026, YYYY-MM, Jan 2026, Q1 2026, date cells) in any column, reported as detected_periods and period_range. A raw DATEV EXTF export and a French FEC (compact YYYYMMDD dates) are detected natively; on any columnar ledger a journal column of short codes is mapped as category_column, and its opening journal (AN, RAN, ANO, AD, or a journal labelled "à nouveau") is read as opening entries (opening_rows; prior-year rows moved into the first month) — remap or ignore that column to change it. structure_override re-parses with corrected columns when a ledger is misdetected (a Débit column taken as the value, an account-code column taken as the label) or when a wide sheet has fewer than three period columns (layout: "wide"). Without sheet_name, a model workbook (formulas under period headers) also returns workbook (how far the Excel engine recalculates it, its scenario selectors with their scenarios, its data tables) and guidance. The raw binary is not returned.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_id": "<file_id>"
},
"name": "layerz_parse_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | Upload id as returned by layerz_create_upload_url ('f_' + 16 hex chars). | |
| sheet_name | No | Sheet of a multi-sheet workbook. Omitted: sheet summaries only. | |
| structure_override | No | Override auto-detected columns for a long-format/ledger file (e.g. value_column chose "Débit" and dropped credit rows, or an account-code column won the label). Omitted fields stay auto-detected. |