Skip to main content
Glama

Read CSV header

csv2zugferd_csv_header_get
Read-onlyIdempotent

Reads a CSV header row and returns column names in file order plus the data row count, optionally including up to three sample rows to help draft a mapping.

Instructions

Reads the header row of a CSV file and returns the column names in file order plus the number of data rows. Optionally returns up to 3 sample rows (sampleRows, default 0) so the mapping can be drafted from real values. Does not validate a configuration (use csv2zugferd_config_get) and does not map an invoice (use csv2zugferd_invoice_get). Read-only, writes no files.

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": {
      "csvPath": "<csvPath>"
    },
    "name": "csv2zugferd_csv_header_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
csvPathYesPath to the CSV file on the local file system (absolute or relative to the server's working directory).
encodingNoText encoding of the file, for example UTF-8 or windows-1252. Same meaning as csv.encoding in the YAML configuration.UTF-8
separatorNoColumn separator used in the file. Use "\t" for tab. Same meaning as csv.separator in the YAML configuration.;
sampleRowsNoNumber of data rows to return as samples, 0 to 3. Default 0 returns no cell values, only the header.

Output Schema

NameRequiredDescriptionDefault
columnsYesColumn names from the header row in file order.
csvPathYesThe csvPath argument as given.
encodingYesThe encoding that was applied.
rowCountYesNumber of data rows after the header.
separatorYesThe separator that was applied.
sampleRowsYesSample data rows, each as a list of cell values in column order. Empty unless sampleRows > 0.
columnCountYesNumber of columns in the header row.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and destructiveHint=false, and the description reinforces that with 'writes no files' while adding useful sampling behavior and the fact that header order is preserved. It does not disclose failure behavior for missing/unreadable files or encoding errors, which would be the remaining behavioral gap.

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

Conciseness5/5

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

Three tight sentences: capability first, optional sampling second, exclusions and safety last. No filler and nothing buried.

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

Completeness5/5

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

An output schema exists, so return values need not be re-explained, and the description covers scope, sampling, sibling routing, and read-only safety. Nothing an agent needs in order to call this correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so csvPath, encoding, separator, and sampleRows are already fully documented in the schema. The description only restates the sampleRows default and the 0-3 cap, adding no syntax or format meaning beyond what the schema provides; baseline 3 applies.

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?

States a specific verb and resource ('Reads the header row of a CSV file') plus exactly what comes back: column names in file order, data row count, and optional samples. It also names the siblings it is not (config_get, invoice_get), so the agent can distinguish it without opening a schema.

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

Usage Guidelines5/5

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

Gives explicit routing rules: use this to draft a mapping from real values, use csv2zugferd_config_get to validate a configuration, use csv2zugferd_invoice_get to map an invoice. Both the when and the when-not are stated with named alternatives.

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