Reconcile many-to-many
reconcile_many_to_manyMatch statement deposits to disjoint subsets of invoices via subset-sum ILP, resolving consolidated or split remittances that one-to-one or one-to-many heuristics miss.
Instructions
Match statement deposits to disjoint subsets of invoices via subset-sum ILP.
Purpose: Solves bounded subset-sum as an integer linear program (ILP) to pair statement deposits against matching combinations of outstanding invoice records.
When to use:
When customer deposits consolidate multiple invoices or split remittances.
When one-to-one or one-to-many heuristics leave unmatched aggregates.
When NOT to use:
Do NOT use for straightforward 1:1 or 1:N reconciliation where reconcile is sufficient and faster.
Do NOT use without the optional ilp extra installed (pip install reconcile-mcp[ilp]).
Behavioral transparency: Deterministic ILP optimization; read-only and idempotent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoices | Yes | List of canonical records. Each is an object with 'id' (string) and 'amount' (number) required, plus optional 'currency' (ISO 4217), 'date' (ISO-8601), 'counterparty' (name), 'reference' (remittance/end-to-end id). | |
| statements | Yes | List of canonical records. Each is an object with 'id' (string) and 'amount' (number) required, plus optional 'currency' (ISO 4217), 'date' (ISO-8601), 'counterparty' (name), 'reference' (remittance/end-to-end id). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||