reconcile_account
Compare an account with the balance your bank shows, then reconcile it.
Give the balance shown by the bank today (currency units). If YNAB’s cleared
balance differs, nothing is written: the result explains the gap with the
pending transactions, the one whose amount matches the difference
(explained_by) and likely duplicates. Fix those first (with the user), then
call again. Only if the user wants to accept the remaining gap, call with
adjust=true: a “Balance adjustment” transaction is added to Ready to Assign.
When balances match, every cleared transaction is marked reconciled after the
user confirms (as for apply_categories). undo_operation reverts it.
Comportement
Section intitulée « Comportement »| Nature | écriture — masqué sans AVENIR_MCP_WRITE=1 |
| Confirmation | oui : aperçu, puis application après accord de l’utilisateur |
| Annulation | oui, avec undo_operation |
| Destructif | oui |
| Idempotent | non |
| Requêtes YNAB | 2 pour l’exemple ci-dessous, cache vide |
Paramètres
Section intitulée « Paramètres »| Nom | Type | Obligatoire | Défaut | Description |
|---|---|---|---|---|
plan_id |
string | oui | — | YNAB plan id or ‘last-used’. |
account_id |
string | oui | — | Account to reconcile (from list_accounts). |
bank_balance |
number | oui | — | In currency units, negative for money out; at most a billion either way. |
adjust |
boolean | non | false |
Record the remaining difference as an adjustment. |
confirmation |
string | null | non | null |
Code from a previous “confirmation_required” result. |
| Champ | Type | Description |
|---|---|---|
status |
“applied” | “confirmation_required” | “declined” | “nothing_to_do” | “difference_found” | Outcome: difference_found (nothing changed; see analysis), confirmation_required, applied, declined, or nothing_to_do (already reconciled). |
message |
string | What happened and what to do next, for the agent to relay. |
account |
string | Account name. |
analysis |
object | The comparison with the bank. |
analysis.account_id |
string | The account analysed. |
analysis.bank_balance |
number | Balance the bank shows, as given. |
analysis.cleared_balance |
number | Sum of the account’s cleared and reconciled transactions in YNAB. |
analysis.working_balance |
number | Sum of all the account’s transactions, cleared or not. |
analysis.difference |
number | Bank balance minus cleared balance; negative when YNAB counts more money than the bank. |
analysis.to_reconcile_count |
integer | Cleared transactions not yet reconciled. |
analysis.uncleared_count |
integer | Transactions the bank has not shown yet. |
analysis.uncleared |
array of object | Up to 50 of them. |
analysis.explained_by |
array of string | Uncleared transactions whose amount equals the difference. |
analysis.possible_duplicates |
array of array of string | Pairs with the same amount and merchant, at most 3 days apart, over the last 60 days. |
adjustment |
number | null | Amount of the balance adjustment created, if adjust was requested; else null. |
confirmation |
string | null | Single-use code confirming exactly this preview, valid 10 minutes; null unless status is confirmation_required. |
operation_id |
string | null | Journal id of the applied operation, for undo_operation; null unless status is applied. |
Arguments :
{ "plan_id": "demo-budget", "account_id": "acc-checking", "bank_balance": 3440.8}Réponse sur le budget de démonstration :
{ "status": "difference_found", "message": "YNAB's cleared balance differs from the bank by -71.86. Nothing was changed. Check explained_by, uncleared and possible_duplicates with the user; call again once fixed, or with adjust=true to record the gap as an adjustment.", "account": "Checking", "analysis": { "account_id": "acc-checking", "bank_balance": 3440.8, "cleared_balance": 3512.66, "working_balance": 3512.66, "difference": -71.86, "to_reconcile_count": 49, "uncleared_count": 0, "uncleared": [], "explained_by": [], "possible_duplicates": [ [ "tx-050", "tx-051" ] ] }, "adjustment": null, "confirmation": null, "operation_id": null}Account {account_id} is not in this plan: use an id from list_accounts.This client cannot ask the user to confirm, and AVENIR_MCP_REQUIRE_ELICITATION=1 forbids confirmation codes: nothing was changed. Use a client that supports MCP elicitation, or unset the variable.This confirmation code is unknown, expired, already used, or was issued for different changes. Call again without confirmation to get a new preview.Confirmation codes are disabled (AVENIR_MCP_REQUIRE_ELICITATION=1): call again without confirmation, and the user answers in the client.The plan changed between the preview and the answer. Call again without an answer to get a new preview.
Les erreurs propres à YNAB reviennent sous la forme Error calling tool '<tool>': YNAB <status>: <detail>.
Voir aussi
Section intitulée « Voir aussi »Projet non officiel. « We are not affiliated, associated, or in any way officially connected with YNAB or any of its subsidiaries or affiliates. » Nous ne sommes ni affiliés, ni associés, ni liés officiellement à YNAB. YNAB et You Need A Budget sont des marques déposées de YNAB. avenir-mcp est fourni tel quel, sans garantie, et n’est pas un conseil financier. Mentions légales