reconcile-ledger
Exact Ledger Reconciler — Explains which charges, refunds and fees make up a Stripe, PayPal or bank payout, with an exact solver instead of a model: subset-sum over integer minor units (meet-in-the-middle, DP, branch-and-bound) across candidate fee schedules (percentage + fixed, tiers, caps), withholding, FX rates and rounding conventions (half-up, half-even, truncate; per line or on the total). Paste a Stripe balance or p
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "reconcile-ledger"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Messy source text for collections not given structurally. A CSV with a header (Stripe balance or payout-reconciliation export, PayPal activity export, bank statement) is parsed by code with no model, and so are headerless lines with one amount each (date, id, amount, currency, and wording that names one kind, such as Payment or Refund); anything else goes to a fast-tier LLM that must quote every row verbatim. | |
| items | No | Ledger lines. Amounts are signed (refunds and disputes negative) strings in major units, e.g. "1234.56". | |
| limits | No | ||
| fxRates | No | Direct rates only (1 from = rate to). The latest rate dated on or before the reference date applies; an undated rate is the fallback. | |
| crossCheck | No | Run two independent LLM translations and keep only rows both produced (default true). | |
| maxLagDays | No | An item may settle at most this many days after its date. | |
| conventions | No | Restrict the conventions searched (default: all rounding modes x both scopes x both FX date policies). | |
| settlements | No | Payouts or bank settlement totals to explain. | |
| feeSchedules | No | Candidate fee schedules; the solver reports which one reconciles each settlement. Omit for no fees. | |
| withholdings | No | ||
| toleranceMinor | No | Accepted |residual| per settlement in minor units (default 0 = exact). | |
| defaultCurrency | No | Currency for text rows that state none. | |
| nearMissToleranceMinor | No | Largest residual searched when reporting the closest near-miss for an unmatched settlement. |