Read CSV header
csv2zugferd_csv_header_getReads 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
| Name | Required | Description | Default |
|---|---|---|---|
| csvPath | Yes | Path to the CSV file on the local file system (absolute or relative to the server's working directory). | |
| encoding | No | Text encoding of the file, for example UTF-8 or windows-1252. Same meaning as csv.encoding in the YAML configuration. | UTF-8 |
| separator | No | Column separator used in the file. Use "\t" for tab. Same meaning as csv.separator in the YAML configuration. | ; |
| sampleRows | No | Number of data rows to return as samples, 0 to 3. Default 0 returns no cell values, only the header. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | Yes | Column names from the header row in file order. | |
| csvPath | Yes | The csvPath argument as given. | |
| encoding | Yes | The encoding that was applied. | |
| rowCount | Yes | Number of data rows after the header. | |
| separator | Yes | The separator that was applied. | |
| sampleRows | Yes | Sample data rows, each as a list of cell values in column order. Empty unless sampleRows > 0. | |
| columnCount | Yes | Number of columns in the header row. |