Reconcile Export Documents
reconcile_documentsReconciles a shipment's export documents against each other and returns the seven checks from the kubik.tools Export-Set: whether the gross weights add up, whether every net weight comes from a measured source or is marked as an estimate, whether the values match the invoice TOTAL (freight and loading as their own line, not a subtotal), whether each Kollo's allocated articles equal that Kollo's own gross — per package, never in aggregate, whether the net weights on the invoice tie to the Speditionsauftrag article for article, whether the mandatory fields (tariff number and country of origin) are filled on every position, and whether the same article carries the same tariff number across every document supplied, matched through the alias table rather than by string equality.
Give it the sheets as plain rows of cells — exactly what you would read out of the spreadsheet, header row and title block included. Do NOT pre-clean them: where the header sits relative to a title block is one of the things the engine reads, and removing blank rows or columns destroys it.
invoice and packing are required; spedi (the forwarder's Speditionsauftrag) is optional and, when present, is what checks 5 and 7 compare against instead of the packing list.
What it does NOT do: it does not produce the Exportdatenblatt workbook, it does not invent a tariff number or a country of origin (a missing one is reported by check 6, never filled in), and it does not store anything — no row of these documents is kept or logged.
Read the verdict first. It names what to do next, not a score: "pass" — every check ran and agreed; "attention" — at least one check found the documents contradicting each other, and flagged_checks names which; "confirm_aliases" — no contradiction, but an article number on one document has no counterpart on the other, which a human confirms as an alias rather than fixes; "incomplete" — a check could not run at all (no Kollo was found on the packing list), so this is not a pass and skipped_checks says which check was lost.
A flagged check is the product working, not failing — the gate exists to surface a disagreement between documents before it reaches customs.
Check titles and details come back in German, verbatim as they are printed on the Abstimmung sheet the human sees, so that what you report and what they read are the same words.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spedi | No | The forwarder's Speditionsauftrag, if you have it. Optional — checks 5 and 7 compare against it when present. | |
| api_key | Yes | Your team's kubik.tools MCP API key (kubik_mcp_...). Required. | |
| invoice | Yes | The commercial invoice sheet. Required. | |
| packing | Yes | The packing list sheet. Required. | |
| spedi_sheet_name | No | Sheet name as it appears in the workbook. Cosmetic; defaults to 'Speditionsauftrag'. | |
| invoice_sheet_name | No | Sheet name as it appears in the workbook. Cosmetic; defaults to 'Rechnung'. | |
| packing_sheet_name | No | Sheet name as it appears in the workbook. Cosmetic; defaults to 'Packliste'. |