Methods

Every JSON-RPC method, which is also an MCP tool and a red-ale exec command.

account

  • account.balanceAn account's balance, cleared and reconciled balances, optionally as of a date and with sub-accounts.
  • account.cascadeSet colour, placeholder or hidden on an account and all its sub-accounts.
  • account.checkBalanceLimitCompare an account's balance with its balance limits, as GnuCash's account tree does to warn.
  • account.createCreate an account under a parent (the root by default).
  • account.deleteDelete an account, moving or deleting its transactions and sub-account.
  • account.getDescribe one account.
  • account.listList accounts depth first in the book's order, and names that contain the separator.
  • account.moveMove an account, with its sub-accounts, under another parent.
  • account.openingBalanceAccountFind the account GnuCash would put a currency's opening balances in: by its flag, then by name.
  • account.renumberRenumber the codes of an account's immediate sub-accounts.
  • account.treeThe account tree as nested nodes, in the book's order or GnuCash's display order.
  • account.typesList the account types with GnuCash's labels and rules.
  • account.updateChange an account's name, type, commodity, smallest fraction, code, notes, flags, tax settings, colour, balance limits, opening balance flag or associated accounts.

billTerm

book

  • book.closeClose the open book and release its lock.
  • book.closeBooksClose the books: move income and expense balances into equity at a closing date, one closing transaction per currency. Not book.close.
  • book.createCreate a new, empty XML or SQLite book and open it.
  • book.infoDescribe the open book: path, read-only state, features and counts.
  • book.openOpen an XML or SQLite book. Some books open read-only (see readOnlyReasons).
  • book.optionsThe book's num field source, auto read-only threshold (with today's threshold date), trading accounts option, default budget, business options and default invoice report.
  • book.replayJournalReplay a GnuCash .log journal onto the open book: create, update or delete transactions by GUID.
  • book.saveSave the open book, backing up the previous file first (for an SQLite book, before the session's first save).
  • book.setOptionsSet the num field source, the auto read-only threshold, trading accounts, the default budget, the business options or the default invoice report, as GnuCash's book options dialog does.

budget

  • budget.copyCopy a budget as GnuCash's Copy Budget does (notes are not copied).
  • budget.createCreate a budget; the first sets the Book feature for natural signs.
  • budget.deleteDelete a budget; the last unsets the Book feature for natural signs.
  • budget.estimateOverwrite accounts' budget amounts with figures from past transactions, as GnuCash's Estimate dialog does.
  • budget.getOne budget with its periods, amounts and notes.
  • budget.listEvery budget in book order, and which is the default.
  • budget.scrubSignsRun GnuCash's natural-signs scrub: guess each budget's old sign convention and flip amounts to match.
  • budget.setAmountsSet or unset many budget amounts, atomically.
  • budget.setNotesSet or delete many budget notes, atomically.
  • budget.updateChange a budget's name, description, number of periods or recurrence.

commodity

  • commodity.createCreate a security, with the security editor's checks.
  • commodity.deleteDelete a security that nothing uses; its prices go too only with deletePrices.
  • commodity.getDescribe one commodity, with how much of the book uses it.
  • commodity.listList commodities: the book's own and the built-in ISO 4217 currencies.
  • commodity.namespacesList the commodity namespaces with how many commodities each holds.
  • commodity.updateEdit a security (any field, including a rename) or a currency's quote flag, quote time zone and symbol.

config

  • config.getThe whole Configuration, or one setting by path, with defaults filled in; secrets shown only as set or unset.
  • config.schemaThe Configuration's JSON Schema: every setting, its type, default and description.
  • config.setChange one or more settings by path, validated against the schema, all or none; null restores a default.

counter

  • counter.listEvery counter: the last number issued, its format and the next ID it would give.
  • counter.setSet a counter's last number issued or its format; a null or empty format means the default.

currency

customer

  • docLink.documentsInvoices, bills and vouchers with a document link, with the URI each one opens.
  • docLink.pathHeadThe configured folder relative document links start from.
  • docLink.setPathHeadSet or remove the folder relative document links start from, in red-ale's configuration.
  • docLink.transactionsTransactions with a document link, with the URI each one opens.

employee

export

  • export.accountsWrite a new book file holding the open book's account tree and commodities, and no transactions. Never overwrites a file.
  • export.csvTransactionsTransactions of some accounts and dates as CSV text, in GnuCash's simple or complex layout. Writes no file.
  • export.csvTreeThe account tree as CSV text, as GnuCash's CSV export writes it. Writes no file.

help

  • help.getOne Page of the Manual, by Page ID or method name, as Markdown or text, with its Examples for one door.
  • help.searchPages of the Manual ranked for a question in your own words, best first, each with a snippet.
  • help.topicsEvery Page of red-ale's Manual, or those of one kind: Page ID, kind, title and summary.

import

  • import.applyApply a held Import proposal with the caller's changes, as one Mutation.
  • import.discardDrop a held Import proposal.
  • import.previewRead a file and propose what importing it would do: the Import proposal, held by ID. Changes nothing.

importMap

  • importMap.deleteDelete Import map or online entries, one by one, by kind, or every invalid one.
  • importMap.listList Import map entries (Bayesian, desc, memo, csv-account-map) and online entries.

invoice

  • invoice.addEntryAdd a line to an unposted document (and optionally to an order).
  • invoice.createCreate an invoice, bill or expense voucher; the owner decides which.
  • invoice.deleteDelete an unposted document and its lines.
  • invoice.duePosted, unpaid documents falling due within some days: GnuCash's bills-due and invoices-due reminders.
  • invoice.dueDateWhen a document posted on a date falls due under its (or a given) billing term.
  • invoice.duplicateCopy a document and its lines into a new unposted document with a new number and date, as GnuCash's Duplicate does.
  • invoice.getA document with its lines.
  • invoice.listInvoices, bills and vouchers, optionally filtered.
  • invoice.payRecord a payment of one posted document.
  • invoice.postPost a document to an A/R or A/P account: its transaction, lot, frozen tax tables and terms.
  • invoice.removeEntryDelete a line from its documents and order.
  • invoice.totalsA document's subtotal, tax and total, per tax account and per entry, as GnuCash computes them.
  • invoice.unpostUnpost a document: delete its posted transaction and lot links; payments stay as pre-payments.
  • invoice.updateChange an unposted document, or (de)activate any document.
  • invoice.updateEntryChange a line of an unposted document or open order.

job

  • job.createCreate a job for a customer or vendor; its ID comes from the book's counter unless given.
  • job.getA job.
  • job.listJobs, optionally filtered by owner, name, ID or active state.
  • job.updateChange a job; `active: false` deactivates it.

lot

  • lot.assignSplitPut a split in a lot, cutting it if it would overfill the lot; without a lot, FIFO chooses.
  • lot.computeGainsRecompute a lot's capital gains, recording them in gains transactions.
  • lot.createMake an empty lot in an account, titled `Lot <n>` unless a title is given.
  • lot.deleteDelete a lot; its splits stay but leave the lot. A lot with splits needs releaseSplits.
  • lot.freeSplitsList an account's splits that are in no lot, with the gain each would realise against a lot.
  • lot.getDescribe one lot with its splits.
  • lot.listList an account's lots as the lot viewer shows them, optionally only open or closed ones.
  • lot.removeSplitTake a split out of its lot; a lot left empty is deleted.
  • lot.scrubRepair one lot: merge cut pieces, refill it and recompute its capital gains.
  • lot.scrubAccountAssign an account's splits to lots by FIFO and repair every lot, optionally for its sub-accounts too.
  • lot.updateSet a lot's title or notes; an empty string removes one.

order

payment

  • payment.fromTransactionTurn an existing transaction into a payment and apply it, or re-match an existing payment; its other splits are deleted.
  • payment.openItemsAn owner's open documents and pre-payments in an A/R or A/P account, in the order GnuCash's payment dialog applies them.
  • payment.processRecord an owner's payment and apply it to chosen documents, or to the oldest open ones.

period

  • period.datesThe first and last days of the accounting period containing today or a given date.
  • period.getThe configured accounting period and fiscal year end.
  • period.setSet the accounting period or the fiscal year end in red-ale's configuration.

price

  • price.addAdd a price; a same-day price of the pair is replaced or wins by source precedence, as GnuCash does.
  • price.deleteDelete a price.
  • price.fetchQuotesStart a Quote fetch of online prices; returns its ID at once.
  • price.fetchStatusA Quote fetch's state and, per commodity, the price stored or why there is none.
  • price.getDescribe one price.
  • price.latestThe latest price of a commodity in a currency, either direction.
  • price.listList prices, by commodity, currency and date range, in GnuCash's order.
  • price.nearestThe price of a commodity in a currency nearest to a time, before it, or on its day.
  • price.removeOldRemove old prices, keeping the last of each week, month, quarter or fiscal year.
  • price.updateEdit a price's value, time, source, type, commodity or currency, as the price editor does.

reconcile

  • reconcile.autoClearAuto-clear an account: mark cleared the one set of uncleared splits that brings its cleared balance to a figure.
  • reconcile.findAutoClearFind the one set of uncleared splits that brings an account's cleared balance to a figure, as GnuCash's Auto-clear does.
  • reconcile.finishFinish a reconciliation: ticked splits become reconciled and the statement date becomes the last reconcile date.
  • reconcile.infoAn account's reconcile information: last reconcile date and interval, postponed reconciliation.
  • reconcile.postponePostpone a reconciliation: ticked splits become cleared and the statement is kept for next time.
  • reconcile.setInfoSet or remove an account's last reconcile date, interval, postponed reconciliation or sub-account flag.
  • reconcile.setStateSet a split's reconcile state (n, c, y or f); y stamps the reconcile date.
  • reconcile.startStart reconciling an account against a statement: GnuCash's defaults, the splits to tick and the balances.
  • reconcile.statusThe splits, balances and difference of a reconciliation for a set of ticks, with marks and unmarks applied.

report

scheduledTransaction

scrub

  • scrub.checkAndRepairGnuCash's Check & Repair: orphans, then imbalances, then (if asked) lots.
  • scrub.currencyGive transactions whose currency is not a currency the most common currency of their splits.
  • scrub.imbalanceBalance unbalanced transactions with an Imbalance-<CUR> split, after fixing orphans and split amounts.
  • scrub.orphansPut splits with no account into an Orphan-<CUR> account, balancing each transaction changed.

stock

  • stock.splitRecord a stock split, with an optional price and cash in lieu, as GnuCash's assistant does.

taxTable

transaction

vendor