Match bank lines
Says what bank lines were: entries already booked, invoices or bills they pay, an account to book them to, or nothing to book.
$0.02 per bank line matched
From your agent’s balance. A call that fails costs nothing.
An example
The 238 euros to Hamburg Energie is the electricity we booked, and the 89.25 to Würth is warehouse supplies with 19% VAT.
Your agent callsbooks_match_bank_lines$0.02 per bank line matched
The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.
{
"matches": [
{
"line_id": 41,
"entries": [
58
]
},
{
"line_id": 42,
"account": "8000",
"tax": "VAT 19%",
"description": "Packing tape for the warehouse"
}
]
}Use it when
Bank lines wait to be matched (books_bank_lines); pass a suggestion's match as it is.
What it does
Say what bank lines were, up to 100 at a time, each one of: entries (entry numbers already booked whose lines on the bank account add up to the line), invoices (the open invoices money in pays: their payments are recorded and posted, the amount spread in the order given unless amounts are given), bills (the open supplier bills money out pays, the same way), account (book it there now, with an optional tax split off: a sale when money came in, a cost when it went out), rule (book it the way a bank rule says), ignore (not for the books, e.g. a duplicate), or unmatch (undo; a line booked to an account is reversed). Each line succeeds or fails on its own; only those done are charged.
What comes back
results: each line as it now is (or its error), in the order sent; done and failed counts. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
matchesRequired | array of objects | 1 to 100 items. |
matches[].line_idRequired | integer | At least 1. |
matches[].entries | array of integers | 1 to 20 items. |
matches[].invoices | array of objects | 1 to 20 items. |
matches[].invoices[].invoice_idRequired | string | Exactly 36 characters. |
matches[].invoices[].amount | number or string | Up to 24 characters. |
matches[].bills | array of objects | 1 to 20 items. |
matches[].bills[].bill_idRequired | string | Exactly 36 characters. |
matches[].bills[].amount | number or string | Up to 24 characters. |
matches[].account | string | An account code from the chart, e.g. "6600". 1 to 20 characters. |
matches[].tax | string | A tax by name (books_get lists them), e.g. "VAT 19%". Up to 60 characters. |
matches[].description | string | Up to 300 characters. |
matches[].rate | number or string | One unit of currency in the base currency, e.g. "0.9241". Default: a standing rate, else the European Central Bank's reference rate for the date. Up to 24 characters. |
matches[].rule | string | A bank rule by name (books_list_bank_rules). Up to 80 characters. |
matches[].tracking | object | Tracking options by category, e.g. {"Department": "Service"} (books_list_tracking). |
matches[].ignore | boolean | |
matches[].unmatch | boolean |
The call
Over MCP, call books_match_bank_lines on https://api.conecto.chat/mcp/books. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/books_match_bank_lines \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"matches":[{"line_id":41,"entries":[58]},{"line_id":42,"account":"8000","tax":"VAT 19%","description":"Packing tape for the warehouse"}]}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
no_books409 | The business keeps no books yet. | Set them up with books_setup (base currency, start date). |
currency_mismatch409 | In results, for one line: it and its match are in different currencies. | Record the payment with invoices_record_payment or purchasing_pay_bill instead. |
amount_mismatch409 | In results, for one line: the entries, invoices or bills do not add up to it. | Give amounts, or pick the right records. |
already_matched409 | In results, for one line: the line is matched already, or the entry is matched to another bank line. | Unmatch that line first. |
already_ignored409 | In results, for one line: the line was ignored. | Unmatch it first. |
not_matched409 | In results, for one line: unmatch was asked of a line that is not matched. | Leave it as it is. |
reversed409 | In results, for one line: the entry is reversed, so nothing is left to match. | Match another entry. |
not_posting409 | In results, for one line: invoices or bills do not post to the books, so their payments cannot be matched. | Turn post_invoices on with books_setup. |
wrong_account409 | In results, for one line: payments of that kind do not land on the line's bank account. | Map a payment method to it with books_setup payment_accounts. |
invalid_input400 | In results, for one line: no way to match it was given, money in was matched to bills (or money out to invoices), or the booking does not balance. | Give one of entries, invoices, bills, account, rule, ignore or unmatch. |
not_found404 | In results, for one line: the line, entry, invoice, bill, account, tax or rule is unknown. | Use ids from books_bank_lines and its suggestions. |
no_match409 | In results, for one line: the rule given does not match the line. | Pick the rule its suggestions name, or book it to an account. |
rule_broken409 | In results, for one line: the rule books to an account that was archived or is gone. | Change the rule with books_save_bank_rule. |
More Bookkeeping tools
All 33 tools- Set up the books
books_setupStarts the business's double-entry books (currency, start date, chart of accounts) or changes their settings.$0.001 a call - Read the books' settings
books_getThe books' settings: currency, start date, fiscal year, locked period, roles, payment accounts, taxes, and what is waiting.Free* - List the chart of accounts
books_list_accountsEvery account with its code, type, role and balance on a day.Free* - Add or change accounts
books_save_accountsAdds accounts or changes them, matched by code: name, type, description, code, role or archived.$0.001 a call - Add or change a tax
books_save_taxAdds or changes a tax rate the books use (VAT, GST, sales tax), matched by name.$0.001 a call - Book an expense
books_record_expenseBooks a cost the business paid, with its tax split off and the receipt attached.$0.01 a call - Book a journal entry
books_record_entryBooks a journal entry of two or more balancing lines, for whatever the other tools do not cover.$0.01 a call - Attach a receipt
books_attach_receiptAttaches a receipt from the file store to an entry that has none.$0.01 a call
Give this to your agent.
Set up Conecto from https://conecto.chat/SKILL.md