csv2zugferd
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Workflow: 1) csv2zugferd_csv_header_get reads the CSV columns. 2) csv2zugferd_config_schema_get returns the configuration reference (every YAML key, allowed values, effects); pass section (e.g. mapping.lineItems) for one subtree. 3) Draft the YAML and check it with csv2zugferd_config_get (pass csvPath to compare against the columns). 4) csv2zugferd_invoice_get runs the real mapping without writing files; fix the YAML until totals and warnings are right. 5) csv2zugferd_config_file_create saves the YAML and returns the CLI command for production runs. Production XML/PDF generation is done by the csv2zugferd CLI, not by this server.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| logging | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| csv2zugferd_config_file_createA | Validates configYaml (it must deserialize as a csv2zugferd configuration) and writes it to configPath as UTF-8 without BOM. An existing file is replaced only with overwrite: true; otherwise the call is rejected with file_exists and nothing is written. Returns the full path, the size and the csv2zugferd CLI command that uses the saved file for production runs. Does not run the mapping (use csv2zugferd_invoice_get first) and does not create XML or PDF files. |
| csv2zugferd_config_getA | Loads a YAML configuration from configPath or configYaml and reports its structure: effective settings and modes, every mapped field with its sources, unknown keys (typos), values outside the allowed sets with the fallback the CLI would apply, and ignored or missing sections. With csvPath the referenced columns are compared with the CSV header (missing and unused columns). Does not read cell values and does not calculate totals; use csv2zugferd_invoice_get for a trial run. Read-only, writes no files. |
| csv2zugferd_config_schema_getA | Returns the reference of the csv2zugferd YAML configuration: a JSON Schema of every key with description, type, default and allowed values, plus semantics per key (effect, mode dependency, resolution order value > column > rules > default, fallback for unknown values). Use it before drafting a configuration; no README is needed. The complete reference is about 100 KB; pass section (for example mapping.lineItems) to get one subtree with its definitions. Does not check a concrete configuration (use csv2zugferd_config_get). Read-only. |
| csv2zugferd_csv_header_getA | 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. |
| csv2zugferd_invoice_getA | Runs the real csv2zugferd mapping for one CSV file with the given configuration (configPath or configYaml) without writing any output file: reads the CSV, maps header, parties, line items and totals, builds the ZUGFeRD XML in memory and returns invoice number, type, totals, tax breakdown, warnings with codes and paths, and the XML size. includeLineItems and includeParties (default false) add details; pdfTemplatePath also embeds the XML into a temporary PDF copy to check format and template. Does not create the XML or PDF for production; that is done by the csv2zugferd CLI (csv2zugferd_config_file_create returns the command). Read-only for the user's files; a temporary PDF is created and deleted only with pdfTemplatePath. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| config-reference | The csv2zugferd README with the YAML configuration reference, CLI usage and examples (German). |
| config-columns-suffix | Example YAML configuration for columns mode with numbered suffix columns (Artikel_001, Artikel_002, ...), used by the test suite. |
| config-rows | Example YAML configuration for rows mode (one CSV row per line item), used by the test suite. |
TDQS
Scored across 5 tools
Each tool targets a distinct step of the workflow: writing a config file, inspecting a config, fetching the schema reference, reading a CSV header, and doing an in-memory trial run. The descriptions explicitly disambiguate with cross-references ('use csv2zugferd_invoice_get first', 'use csv2zugferd_config_get'). No two tools overlap in purpose.
All names use snake_case with a shared csv2zugferd_ prefix and a resource_then_action ordering (config_get, csv_header_get, invoice_get). The one deviation is csv2zugferd_config_file_create, which nests an extra noun (config_file) while config_get does not, making resource granularity slightly uneven.
Five tools map cleanly onto five distinct workflow stages (schema reference → CSV inspection → config authoring → config validation → trial run), with no filler. The surface is well scoped for a config/validation assistant around a CLI.
The surface covers the full prepare-validate-preview lifecycle including schema lookup, header inspection, config write, config lint and a dry-run mapping, which is coherent for the stated read-only purpose. The absence of any tool to actually emit production XML/PDF (delegated to the CLI) and no way to remove or list saved config files are minor gaps agents can work around.