Reconcile many-to-many
reconcile_many_to_manyMatches statement deposits to disjoint invoice combinations using subset-sum integer linear programming, resolving consolidated or split remittances left unmatched by simpler one-to-one matching.
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:
Solves combinatorial subset-sum rather than standard 1:1 or 1:N reconciliation, where reconcile is faster.
Requires the optional ilp extra (pip install reconcile-mcp[ilp]).
Behavioral transparency: Deterministic ILP optimization; read-only and idempotent.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"statements": "<statements>",
"invoices": "<invoices>"
},
"name": "reconcile_many_to_many"
}
}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 | |||