account.get
Describe one account.
Describes one account: its type, commodity, smallest fraction (scu), code, flags, colour, balance limits, whether it
has splits and how many sub-accounts it has. Name the account by its full name (Assets:Checking, levels joined with
:, the root left out) or by GUID. An unknown name is not-found; names are case-sensitive.
Examples
Example: with a copy of the reports/test-data example book open as book.gnucash.
JSON-RPC
Request:
{"jsonrpc":"2.0","id":1,"method":"account.get","params":{"account":"Root:Asset:Bank"}}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"name": "Bank",
"fullName": "Root:Asset:Bank",
"type": "ASSET",
"commodity": "CURRENCY::USD",
"scu": 100,
"placeholder": false,
"hasSplits": true,
"children": 0,
"…": "…"
}
}
Command line
red-ale exec --book book.gnucash account.get '{"account":"Root:Asset:Bank"}'
It prints:
{
"name": "Bank",
"fullName": "Root:Asset:Bank",
"type": "ASSET",
"commodity": "CURRENCY::USD",
"scu": 100,
"placeholder": false,
"hasSplits": true,
"children": 0,
"…": "…"
}
MCP tool call
Tool call:
{"name":"account.get","arguments":{"account":"Root:Asset:Bank"}}
Result:
{
"structuredContent": {
"name": "Bank",
"fullName": "Root:Asset:Bank",
"type": "ASSET",
"commodity": "CURRENCY::USD",
"scu": 100,
"placeholder": false,
"hasSplits": true,
"children": 0,
"…": "…"
}
}
Effect: read.
Params
Params naming one account.
account(AccountRef, required): The account.
Result
An account.
guid(Guid, required): GUID.name(string, required): Name.fullName(string, required): Full name: ancestors' names joined by:, without the root.type(string, required): Account type, as GnuCash writes it.parent(Guid or null): Parent; none only for the root.commodity(CommodityId or null): Commodity held.scu(integer (int64), required): Smallest fraction the account's amounts are kept in.nonStandardScu(boolean, required): The smallest fraction was chosen instead of the commodity's.code(string or null): Account code.description(string or null): Description.notes(string or null): Notes.placeholder(boolean, required): Groups other accounts; GnuCash's register refuses splits in it.hidden(boolean, required): Hidden itself.hiddenInTree(boolean, required): Hidden itself or through an ancestor, as GnuCash shows it.taxRelated(boolean, required): Tax-related.taxUs(TaxUs, required): US tax (TXF) settings.depth(integer (uint), required): Levels below the root (top-level accounts are 1).children(integer (uint), required): Number of immediate sub-accounts.hasSplits(boolean, required): The account has splits.color(string or null): Account colour (rgb(r,g,b)as GnuCash's dialog writes it, or as stored); null when unset orNot Set.higherBalanceLimit(Amount or null): Higher balance limit, in raw sign (debits positive).lowerBalanceLimit(Amount or null): Lower balance limit, in raw sign.includeSubaccountBalances(boolean, required): The balance limits apply to the balance with sub-accounts.openingBalance(boolean, required): The EQUITY account holding the opening balances of its commodity.associatedAccounts(map of Guid, required): Associated accounts by tag (such asstock-dividends), each naming an existing account.