Save a bank rule
Saves a bank rule, like Xero's: which new bank lines it matches and how they are booked, to one account or split by percent, each part with its own tax.
$0.001 a call
From your agent’s balance. A call that fails costs nothing.
An example
From now on book every Haspa fee to bank fees, and the Telekom bill 70% to phone with 19% VAT and 30% to my drawings.
Your agent callsbooks_save_bank_rule$0.001 a call
The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.
{
"name": "Bank fees",
"direction": "out",
"account": "6100",
"when": [
{
"field": "counterparty",
"op": "contains",
"value": "Haspa"
}
]
}Use it when
The same kind of line comes every month (bank fees, rent, the phone bill, a card provider's payout) and should book itself.
- For booking one line once, use
books_match_bank_lines.
What it does
A bank rule, like Xero's: which new bank lines it matches and how to book them, so lines that come every month (bank fees, rent, the phone bill) book themselves. when: conditions on the counterparty, description or reference (contains, equals, starts_with, ends_with; any case), all of them or any (match). Narrow it with direction (in, out), amount_min and amount_max (the line's size, no sign) and bank_account. Book to account with an optional tax split off, or split by percent across accounts (70% phone, 30% private), each part with its own tax. Rules are tried by position, lowest first; the first that matches is the line's first suggestion in books_bank_lines, and books_apply_bank_rules books every line a rule matches. Matched by name; only what you pass changes.
What comes back
rule: its name, direction, conditions (when, match), amount range, bank account, parts (account, tax, percent), description, position, how often it was used and when last. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
nameRequired | string | The rule's name, e.g. "Bank fees". 1 to 80 characters. |
new_name | string | Up to 80 characters. |
when | array of objects | 1 to 10 items. |
when[].fieldRequired | string | One of: counterparty,description,reference. |
when[].op | string | One of: contains,equals,starts_with,ends_with. Default: contains. |
when[].valueRequired | string | The words to look for, in any case. 1 to 120 characters. |
match | string | One of: all,any. Default: all. |
direction | string | One of: any,in,out. |
amount_min | number or string | Up to 24 characters. |
amount_max | number or string | Up to 24 characters. |
bank_account | string | Only lines on this bank account (its code); "" for any. Up to 20 characters. |
account | string | An account code from the chart, e.g. "6600". 1 to 20 characters. |
tax | string | A tax by name (books_get lists them), e.g. "VAT 19%". Up to 60 characters. |
tracking | object | Tracking options by category, e.g. {"Department": "Service"} (books_list_tracking). |
split | array of objects | 2 to 10 items. |
split[].accountRequired | string | An account code from the chart, e.g. "6600". 1 to 20 characters. |
split[].tax | string | A tax by name (books_get lists them), e.g. "VAT 19%". Up to 60 characters. |
split[].percentRequired | number | At most 100. |
split[].tracking | object | Tracking options by category, e.g. {"Department": "Service"} (books_list_tracking). |
description | string | The memo of the entries it books. Default: the line's own text. Up to 300 characters. |
position | integer | 0 to 10,000. |
The call
Over MCP, call books_save_bank_rule on https://api.conecto.chat/mcp/books. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/books_save_bank_rule \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Bank fees","direction":"out","account":"6100","when":[{"field":"counterparty","op":"contains","value":"Haspa"}]}'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). |
not_found404 | No account, tax, entry or file of the books has that code, name or id. | Check the codes with books_list_accounts and the taxes with books_get. |
archived409 | The account or tax is archived. | Use another one, or un-archive it with books_save_accounts. |
invalid_input400 | A condition, the amounts, the direction or the parts are not valid: no condition, no account or split, the bank account itself as the target, or percentages that do not add up to 100. | Fix what the message names. |
name_taken409 | new_name is another rule's name. | Pick another name. |
limit_reached409 | The account has 200 bank rules. | Delete rules that are no longer used. |
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