Skip to main content
Glama

Parse uploaded file

layerz_parse_file
Read-only

Parses 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 is detected natively. 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"). The raw binary is not returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYesUpload id as returned by layerz_create_upload_url ('f_' + 16 hex chars).
sheet_nameNoSheet of a multi-sheet workbook. Omitted: sheet summaries only.
structure_overrideNoOverride 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / file_id / description
      Previous value: -"Upload identifier returned by layerz_create_upload_url (format: 'f_' + 16 hex chars)."New value: +"Upload id as returned by layerz_create_upload_url ('f_' + 16 hex chars)."
    • changedInput schema / properties / sheet_name / description
      Previous value: -"Target sheet name for multi-sheet workbooks. Omit to get sheet summaries."New value: +"Sheet of a multi-sheet workbook. Omitted: sheet summaries only."
    • changedInput schema / properties / structure_override / properties / header_row_index / description
      Previous value: -"0-based header row. Omitted: re-detected for the requested `layout` (a columnar override never inherits the wide-layout period-row guess); the row used is reported back (`file_structure` on layerz_import_branch, `suggested_structure` on layerz_parse_file)."New value: +"0-based header row. Omitted: re-detected for the requested `layout` (a columnar override is re-detected rather than inheriting the wide-layout period-row guess); the row used is reported back (`file_structure` on layerz_import_branch, `suggested_structure` on layerz_parse_file)."
  2. Changed1 schema field changed
    • addedInput schema / properties / structure_override / properties / header_row_index / description
      Added value: +"0-based header row. Omitted: re-detected for the requested `layout` (a columnar override never inherits the wide-layout period-row guess); the row used is reported back (`file_structure` on layerz_import_branch, `suggested_structure` on layerz_parse_file)."
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuine behavior beyond that: deterministic parsing, native DATEV EXTF detection, the period-header heuristic, re-detection rules on override, and the explicit note that the raw binary is not returned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single dense paragraph but front-loads the core purpose and return shape before the detection and override details. Nearly every clause carries information, though the period-format enumeration and parenthetical examples make it heavier than strictly necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with a nested `structure_override` object and no output schema, the description names the key returned artifacts (sheet summaries, `detected_periods`, `period_range`, `suggested_structure`) and covers the main detection/override behaviors. Minor gaps remain on full response shape and error conditions, but the agent has enough to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline would be 3. The description rises above it by explaining the intent behind parameters—why `structure_override` exists (Débit taken as value, account-code taken as label, wide sheets with too few period columns) and what omitting `sheet_name` produces.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Parses an uploaded Excel/CSV (`file_id`) deterministically') and immediately names what it returns, which sharply separates it from the write-side sibling `layerz_import_branch`. An agent can tell this is the inspect/parse step versus an import.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives conditional guidance for parameters (omit `sheet_name` for summaries only; use `structure_override` when a ledger is misdetected or a wide sheet has <3 period columns). However, it never states when to reach for this tool versus alternatives such as `layerz_import_branch`, leaving tool-level selection to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources