Change the chart or the tax rates
accounts_setChange the chart of accounts or the tax rates (round 626); written at once, each change in the audit trail. action=add with code, name, type (Asset, Liability, Equity, Income, Expense, a section like Turnover, or Xero's types: Revenue, Overhead, Direct Costs, Current Asset, Fixed Asset, Bank, Current Liability) and tax_rate (optional: a code, a name, or words like '20% (VAT on Expenses)', 'No VAT'); action=change with code and name and/or type; action=archive or restore with code (an account with a balance or a role in the books, a bank or VAT account, is refused with the reason); action=default_tax with code and tax_rate (empty clears it); action=import with csv (the text of a CSV: Code, Name, Type, Tax rate; Xero's chart export as it is) or rows (a list of {code, name, type, tax_rate}): adds and updates, preview=true checks only. Tax rates: action=add_rate with base (the rate it copies: kind, VAT accounts, return boxes), name and rate (optional, only where the base has a rate); action=rename_rate with code and name; action=archive_rate or restore_rate with code (postings keep an archived rate). Round 832: action=change_code with code and new_code (the account keeps its name, type, tax rate, roles and history; its entry lines move to the new code and keep the old one in the record, the chain of entries verifies as before); action=merge with code and into (an account of the same type: every line, balance and role of code goes to into, code is kept on record as moved to into; change_code and merge are refused where a line is in a locked period or the boxes of a filed VAT return would change); action=parent with code and parent (a sub account under an account of the same type; the reports show it under the parent with the parent's total; empty parent ends it); action=lock or unlock with code (lock: hand journals, from this connection and from the web, refuse the account; invoices, bills, bank lines and payroll still post; off by default). Round 966: action=renumber with code and number (and name, optional): the number the account shows and is typed by; the code, every entry, the balance and the reports stay; refused where another account shows or is typed by that number; the answer's change_id undoes it with action=renumber_undo; action=numbers with mode short (3 to 4 digits, the default: an imported 7300.493 shows 493) or long (with the group: 7300.493).
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": {
"action": "<action>"
},
"name": "accounts_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv | No | ||
| base | No | ||
| code | No | ||
| into | No | ||
| mode | No | ||
| name | No | ||
| rate | No | ||
| rows | No | ||
| type | No | ||
| action | Yes | ||
| number | No | ||
| parent | No | ||
| company | No | ||
| preview | No | ||
| new_code | No | ||
| tax_rate | No | ||
| change_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||