Skip to main content
Glama

Audit PO vs Receiving vs Supplier Invoice (3-Way Match + QuickBooks/Xero CSVs)

reconcile_po_three_way_match
Read-onlyIdempotent

Performs 3-way match on POs, receiving counts, and invoices to catch overbilling, short shipments, price creep, and freight overages. Exports verified QuickBooks/Xero bill CSVs.

Instructions

Deterministic Finance Ops 3-way match engine for wholesalers and Shopify merchants. Cross-examines approved Purchase Order lines, warehouse dock receiving counts (good vs damaged units), and billed supplier invoice lines to catch silent unit-price creep, short-shipments billed in full, unapproved surcharges, and freight cap overages. Emits ready-to-import QuickBooks Online (quickbooks_bill_csv) and Xero (xero_bill_csv) Purchase Bill CSVs containing ONLY verified payable quantities and unit costs, plus a vendor Debit Memo email. Free Local Sandbox audits up to 15 invoice lines per call; Pro/License unlocks unlimited invoice audits.

Input Schema

NameRequiredDescriptionDefault
vendorNoVendor or distributor name.Supplier
currencyNo3-letter ISO currency code for QuickBooks/Xero export.USD
due_dateNoBill due date in YYYY-MM-DD format (defaults to Net 30 from invoice_date).
po_linesNoApproved Purchase Order line items.
demo_modeNoRun a realistic 3-way match audit catching silent price creep, damaged units, and unapproved pallet fees.
po_numberNoPurchase Order reference number.PO-2026-1042
invoice_dateNoInvoice date in YYYY-MM-DD format (defaults to today UTC).
invoice_linesNoBilled lines extracted from the supplier PDF/CSV invoice.
invoice_numberNoSupplier invoice number for QuickBooks/Xero Bill CSV export (defaults to INV-<po_number>).
receiving_linesNoWarehouse receiving counts per SKU.
xero_account_codeNoXero chart-of-accounts code for inventory/COGS lines (defaults to '310').
qbo_expense_accountNoQuickBooks Online expense/COGS account name (defaults to 'Cost of Goods Sold').
agreed_freight_cap_usdNoMaximum freight/shipping charge agreed on the PO, if applicable.
invoice_extra_fees_usdNoFreight, pallet, or handling charges billed on the invoice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower, yet the description still adds real behavior: determinism, the four specific mismatch classes detected, the two CSV export targets, the debit-memo artifact, and the 15-line free-tier cap. One ambiguity: 'Emits ... a vendor Debit Memo email' could read as an outbound send under readOnlyHint=true, though 'Emits' most plausibly means generated as output — worth clarifying but not a hard contradiction.

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

Conciseness4/5

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

Four sentences, front-loaded with the engine's purpose and backed by concrete audit targets and outputs; the paywall/quota sentence sits last where it belongs. Slight marketing padding ('Deterministic Finance Ops', 'silent unit-price creep') costs a point but nothing is buried.

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

Completeness4/5

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

With 14 parameters but 100% schema description coverage and no output schema, the description carries its weight by describing exactly what is returned (QuickBooks and Xero bill CSVs with verified quantities/costs, plus a debit memo) and the quota limit. It leaves demo_mode, date defaults, and failure behavior to the schema, which is acceptable but not complete.

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

Parameters4/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, and the description goes beyond it by tying business concepts to specific parameters — damaged vs good receiving units, freight cap overages (agreed_freight_cap_usd), unapproved surcharges (invoice_extra_fees_usd), and dual accounting exports. It still doesn't explain defaults like demo_mode or the date/currency conventions, so it improves on the schema without fully replacing it.

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 chain and the exact three data sources it reconciles (approved PO lines, dock receiving counts split good/damaged, billed invoice lines), plus the artifacts produced. This is clearly distinguishable from the sibling tools (replenishment planning, PO building, CSV migration), so an agent can route here for audit work without opening any schema.

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

Usage Guidelines3/5

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

Usage context is implied by 'for wholesalers and Shopify merchants' and by naming the audit scenarios (price creep, short-shipments, surcharges, freight caps), but there is no explicit 'use this when / not when' statement and no reference to the sibling tools as alternatives. The only explicit condition is a licensing/quota note, which is not selection guidance.

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