Skip to main content

Overview

Chart of accounts tools manage the account structure, hierarchy, and balances.

CRUD Tools

finance_account_create

Create a new account. Parameters:
ParameterTypeRequiredDescription
account_idstringYesUnique account ID
account_namestringYesAccount name
account_typestringYesType: Asset, Liability, Equity, Revenue, Expense
normal_balancestringYesNormal balance: Debit or Credit
parent_account_idstringNoParent account for hierarchy
descriptionstringNoAccount description
is_activebooleanNoActive status (default: true)
is_summarybooleanNoSummary account (no postings)

finance_account_get

Retrieve an account by ID. Parameters:
ParameterTypeRequiredDescription
account_idstringYesAccount ID

finance_account_list

List accounts with filters. Parameters:
ParameterTypeRequiredDescription
account_typestringNoFilter by type
is_activebooleanNoFilter by active status
parent_account_idstringNoFilter by parent
searchstringNoSearch by name or ID

finance_account_update

Update an account. Parameters:
ParameterTypeRequiredDescription
account_idstringYesAccount ID
account_namestringNoUpdated name
descriptionstringNoUpdated description
is_activebooleanNoActive status
Account type and normal balance cannot be changed after transactions are posted.

finance_account_delete

Delete an account (only if no transactions). Parameters:
ParameterTypeRequiredDescription
account_idstringYesAccount ID

Balance Tools

finance_account_get_balance

Get account balance for a period. Parameters:
ParameterTypeRequiredDescription
account_idstringYesAccount ID
posting_period_idstringNoPeriod (default: current)
as_of_datestringNoPoint-in-time balance
Response:
{
  "account_id": "1000",
  "account_name": "Cash",
  "balance": 50000.00,
  "debit_total": 100000.00,
  "credit_total": 50000.00,
  "as_of": "2024-01-31"
}

finance_account_get_balances

Get balances for multiple accounts. Parameters:
ParameterTypeRequiredDescription
account_idsarrayYesArray of account IDs
posting_period_idstringNoPeriod
as_of_datestringNoPoint-in-time

Hierarchy Tools

finance_account_get_hierarchy

Get account hierarchy tree. Parameters:
ParameterTypeRequiredDescription
root_account_idstringNoStart from specific account
account_typestringNoFilter by type
max_depthnumberNoMaximum tree depth
Response:
{
  "accounts": [
    {
      "account_id": "1000",
      "account_name": "Assets",
      "children": [
        {
          "account_id": "1100",
          "account_name": "Current Assets",
          "children": [
            { "account_id": "1110", "account_name": "Cash" },
            { "account_id": "1120", "account_name": "Accounts Receivable" }
          ]
        }
      ]
    }
  ]
}

finance_account_move

Move an account in the hierarchy. Parameters:
ParameterTypeRequiredDescription
account_idstringYesAccount to move
new_parent_idstringYesNew parent account