Method

account.types

List the account types with GnuCash's labels and rules.

Lists GnuCash's account types, with each one's label, its fundamental type (asset, liability, income, expense or equity), the kind of commodity it holds, the types it can sit under (parentTypes) and the types it can be changed to once it has splits (changesWithSplits). Call it to find out what type values account.create accepts. A type with choosable: false is deprecated and cannot be chosen.

STOCK and MUTUAL hold securities; the others hold a currency. Receivable and Payable accounts cannot change type once they have splits.

Examples

Example: with a new, empty book open as book.gnucash.

JSON-RPC

Request:

{"jsonrpc":"2.0","id":1,"method":"account.types","params":{}}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "name": "BANK",
      "label": "Bank",
      "fundamental": "ASSET",
      "choosable": true,
      "commodity": "currency",
      "…": "…"
    },
    "…"
  ]
}

Command line

red-ale exec --book book.gnucash account.types

It prints:

[
  {
    "name": "BANK",
    "label": "Bank",
    "fundamental": "ASSET",
    "choosable": true,
    "commodity": "currency",
    "…": "…"
  },
  "…"
]

MCP tool call

Tool call:

{"name":"account.types","arguments":{}}

Result:

{
  "content": [
    {
      "type": "text",
      "text": "[{\"name\":\"BANK\",\"label\":\"Bank\",\"fundamental\":\"ASSET\",\"choosable\":true,\"commodity\":\"currency\",\"…\":\"…\"},\"…\"]"
    }
  ]
}

Effect: read.

Params

Params for methods that take none.

Type: NoParams.

Result

Type: array of TypeInfo.