Skip to main content
Glama

Reconcile Export Documents

reconcile_documents
Read-onlyIdempotent

Reconciles 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

TableJSON Schema
NameRequiredDescriptionDefault
spediNoThe forwarder's Speditionsauftrag, if you have it. Optional — checks 5 and 7 compare against it when present.
api_keyYesYour team's kubik.tools MCP API key (kubik_mcp_...). Required.
invoiceYesThe commercial invoice sheet. Required.
packingYesThe packing list sheet. Required.
spedi_sheet_nameNoSheet name as it appears in the workbook. Cosmetic; defaults to 'Speditionsauftrag'.
invoice_sheet_nameNoSheet name as it appears in the workbook. Cosmetic; defaults to 'Rechnung'.
packing_sheet_nameNoSheet name as it appears in the workbook. Cosmetic; defaults to 'Packliste'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A5/5.0
Behavior5/5

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

Beyond annotations (readOnlyHint, idempotentHint), the description discloses that nothing is stored or logged, explains that a flagged check means the tool is working correctly rather than failing, and details the verdict semantics (pass, attention, confirm_aliases, incomplete) including which fields they carry. This goes well beyond the annotation hints and adds genuine behavioral context. No contradiction with annotations.

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?

Although long, every sentence carries information. It is logically organized: purpose, input instructions, requirements, non-goals, verdict meanings, and a note about language. The main action and key constraints are front-loaded. There is no filler or repetition.

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?

The description fully covers what the tool does, how to invoke it, what the response looks like (verdicts and fields), and edge cases (missing Kollo, alias confirmation). Since there is no output schema, the description compensates by detailing the return semantics. No obvious gap remains for an agent to call it correctly.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline is 3. The description adds substantial meaning: it clarifies that invoice/packing are required, spedi is optional and drives checks 5 and 7, and that sheet-name params are cosmetic. It also defines the expected format for the array parameters (exact cell rows including headers/title block), which is critical for correct invocation and not derivable from the schema alone.

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 ('Reconciles a shipment's export documents') and enumerates the seven checks in precise detail. It also explicitly lists what the tool does NOT do, which clearly distinguishes it from siblings like calculate_chargeable_weight or check_truck_fit. The purpose is unambiguous and self-contained.

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?

It provides explicit instructions on how to supply data (plain rows, no pre-cleaning), which parameters are required (invoice, packing) vs optional (spedi), and the consequence of omitting spedi. It also states exclusions ('does not produce the Exportdatenblatt workbook') which function as when-not guidance. This is comprehensive and actionable.

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