Show words as

Operations reference

Every operation that the CLI and MCP offer, by area.

Published

Righto has 155 operations. The CLI, the MCP server, and the app use the same list. This page is made from that list, so it always agrees with your version of Righto.

Run an operation with righto <area> <action>, for example righto accounts list. Run righto describe <area> <action> to see its input schema and an example. In MCP, each operation is one tool (or use the compact tools). See Run your books from Claude Code or Codex.

A query reads. A command changes the books and needs Propose changes or Full access. Commands marked Reverses or reopens correct earlier work.

Business

  • righto business get: Get business (query). Read the business name, currency, books start date, and current revision. Read this before a command: every command needs the current revision as expected.businessRevision.
  • righto business get-settings: Get business settings (query). Read the business display name, fiscal year start month, report basis (always CASH), chart template, books start date, onboarding steps, and settings revision.
  • righto business update-settings: Update business settings (command). Change the display name, fiscal year start month, legal entity type, tax classification, or onboarding state of the business. Supply the settings revision and at least one change. Righto reports on the cash basis only, so there is no basis setting. A change of entity type does not rename accounts.

Accounts

  • righto accounts list: List accounts (query). List the chart of accounts with IDs, codes, names, types, roles, active state, revisions, and cash flow class (cashFlowClass and effectiveCashFlowClass). A bank or card chart account also shows its financialAccountId. A command that needs a financialAccountId takes that ID, or the ID from financialAccounts.list, not the chart account ID.
  • righto accounts create: Create account (command). Create one chart account. The currency is always USD.
  • righto accounts update: Update account (command). Rename, recode, archive (active false), restore, or set the cash-flow class or the subtype of one chart account. Supply the account revision from accounts.list and at least one change. An account with a balance, an open item, or a control role cannot be archived.
  • righto accounts reconciliation-status: Reconciliation status (query). List every financial account with its financialAccountId, kind, and name, and its reconciliation state, book balance, latest statement balance, and last verified period. Each account has its own state.

Financial Accounts

  • righto financial-accounts create: Create financial account (command). Create a bank, credit card, cash, or processor account and its chart account. A credit card becomes a liability; the other kinds become assets. The display name defaults to the name.
  • righto financial-accounts list: List financial accounts (query). List the bank, card, cash, and processor accounts, sorted by display name. Each row has the financialAccountId for imports, transactions, and reconciliation, the kind, the masked reference, the linked chart account, and the reconciliation state.
  • righto financial-accounts get: Get financial account (query). Read one bank, card, cash, or processor account with its linked chart account and its reconciliation state. For the reconciliation details, call accounts.reconciliationStatus.

Opening

  • righto opening post: Post opening balances (command). Post the cash-basis opening balances in one commit. Debits must equal credits. Amounts are cents as strings. Opening items are not allowed here; use openings.post for them.

Openings

  • righto openings post: Post opening with items (command). Post the cash-basis opening balances with optional open bills, receivables, and other timing items that existed on the opening date. Debits must equal credits. Do not put the open items in the balances. You supply new UUIDs for items, splits, and movements.

Events

  • righto events post: Post transaction (command). Post one balanced transaction. Debits must equal credits. Amounts are cents as strings. Prefer ledger.recordTransaction for ordinary bank and card activity.

Ledger

  • righto ledger record-transaction: Record bank transaction (command). Record one deposit or withdrawal on a financial account, split across income, expense, or other category accounts. On a credit card, WITHDRAWAL is a charge (the amount owed increases) and DEPOSIT is a payment or refund. The splits must add up to the amount exactly; a negative split reverses the usual side. Do not use control, bank, card, or owner equity accounts as splits.
  • righto ledger record-owner-contribution: Record owner contribution (command). Record money that the owner put into the business through a financial account. The equity account defaults to the one active owner capital account.
  • righto ledger record-owner-draw: Record owner draw (command). Record money that the owner took out of the business through a financial account. The equity account defaults to the one active owner draw account.
  • righto ledger record-loan-proceeds: Record loan proceeds (command). Record loan money received into a financial account. The loan account must be a general liability account that is not a bank or card account.
  • righto ledger record-loan-payment: Record loan payment (command). Record a loan payment from a financial account, split into principal and interest. Either amount can be “0”, but not both. An interest amount above zero needs interestAccountId (a general expense account).
  • righto ledger reverse: Reverse posted event (command, Reverses or reopens). Void one posted event with a reversing event; the original stays in the record. The reversal date defaults to the original date. If dependent records exist, the service lists them and you must reverse them first.
  • righto ledger set-funding-arrangement: Set funding arrangement (command). Say how a posted entry that buys something with borrowing or owner property was paid, for the cash flow statement (the qualification FUNDING_ARRANGEMENT_NEEDED names these entries). LENDER_PAID_SELLER: a lender paid the seller. SELLER_FINANCED, OWNER_CONTRIBUTED, OTHER_NONCASH: noncash. null clears it. Ask the user; do not guess. It changes no journal.
  • righto ledger list-events: List posted events (query). List posted events with type, status, amounts, and accounts, newest first by default. All filters are optional; the dates are inclusive. Use nextCursor to get the next page.
  • righto ledger get-event: Get posted event (query). Read one posted event with its journal lines, allocations, dependencies, and related items. Use the CASH journal; the other journal is internal bookkeeping detail.

Journal

  • righto journal create: Create journal entry (command). Post an advanced journal entry with 2 to 1000 lines. Debits must equal credits. A line on a bank or card account becomes a money movement. Control accounts (receivables, payables, transit) need their own workflows. Set reclassification true for a pure presentation move between accounts of the same type (for example, the current portion of a loan); the cash flow statement does not show it.

Bills

  • righto bills create: Create bill (command). Record a bill that the business owes. Righto tracks it until it is paid. It counts on the cash basis when it is paid with payments.record. Splits are expense or other category accounts, not a fixed asset: equipment on credit is a journal.create entry.

Receivables

  • righto receivables create: Create receivable (command). Record money that a customer owes the business. Righto tracks it until it is paid. It counts on the cash basis when it is paid with payments.record. Splits are income or other category accounts.
  • righto receivables invoice-pdf: Make invoice PDF (query). Make the invoice PDF of one receivable as base64 in one reply: business details, Bill to from the contact, dates, terms, lines, total, paid so far, amount due, and Paid, Overdue or Void when that applies. The total is the receivable total; it posts nothing. Optional style sets the design and business details. Optional details set PO number, ship-to, terms, and quantity, unit price, discount or tax for each line. The reports-and-sql guide topic has the rules.
  • righto receivables invoice-sample: Make sample invoice (query). Make a sample invoice of this business with a style, to see the style before any receivable exists. The style fields are the same as in receivables.invoicePdf. format SVG gives the first page as an SVG image for a preview; the default is PDF. It posts and stores nothing.

Items

  • righto items correct: Correct bill or receivable (command, Reverses or reopens). Correct an unpaid bill or receivable in one step: the service reverses the original and records the replacement of the same kind in one atomic command. Posted records do not change. If a payment is recorded on it, the service lists the dependents to reverse first. replacement takes the bills.create input.
  • righto items release: Recognize earned deposit (command). Recognize as income the part of a deposit that the business earned (or that the customer forfeited), use part of a capitalized prepaid expense, or mark part of an advance as earned (an advance is already income, so the reports do not change). To give a deposit back, use refunds.record with itemId instead. The amount cannot be more than the remaining balance in items.list.
  • righto items list: List open items (query). List bills (PAYABLE) and receivables (RECEIVABLE) with remaining amounts and status. Filters are optional. Use nextCursor to get the next page.

Payments

  • righto payments record: Record payment (command). Record a full or partial payment of a bill or receivable through a financial account. An optional fee (for example a processor fee) must be less than the amount; the financial account moves by the amount minus the fee.

Transfers

  • righto transfers create: Create transfer (command). Move money between two different bank or cash accounts (not credit cards). With receivedDate equal to sentDate it posts at once; otherwise the money is in transit until the received date or until transfers.receive. An optional fee uses an expense account.
  • righto transfers receive: Receive transfer (command). Record the arrival of a transfer that is in transit. The amount defaults to the remaining amount in transit.

Cards

  • righto cards record-payment: Record card payment (command). Record a payment from a bank account to a credit card. Optional interest allocations apply part of the payment to card finance charge items; their total cannot exceed the amount.
  • righto cards record-finance-charge: Record card finance charge (command). Record interest or a fee (annual, late) that the card issuer adds to the card balance. It is tracked until it is paid. It becomes an expense when cards.recordPayment allocates a payment to this item. INTEREST needs an INTEREST_EXPENSE account and is in interest paid. A FEE is never interest. A purchase from a third party is not a finance charge: record it as a card transaction.

Refunds

  • righto refunds record: Record refund (command). Record a refund through a financial account. Give exactly one of sourceEventId (a paid event with one money movement) or itemId (an open advance, refundable deposit, or prepaid item). A deposit refund reduces the deposit liability and is not income. The direction of the money comes from the source.

Advances

  • righto advances receive: Receive customer advance (command). Record money that a customer pays before the work. ADVANCE (default): income now, when the money comes in. DEPOSIT: a refundable deposit, a liability until items.release recognizes it as earned (or forfeited) or refunds.record with itemId refunds it. The money goes to a bank, cash, or processor account.

Prepayments

  • righto prepayments record: Record prepaid expense (command). Record a payment for a service that the business gets later, for example a year of insurance. EXPENSE_ON_PAYMENT (default): an expense at payment. CAPITALIZE_AND_RELEASE: an asset at payment, and an expense when items.release uses the amount. The treatment is one policy for the business: every prepaid amount must use the same treatment. Ask the user’s accountant which one.

Processors

  • righto processors record-settlement: Record processor settlement (command). Record new card sales that a payment processor collects: income at the gross amount and the fees as expenses. The processor account increases by the net amount. Do not use it for a payment of an existing receivable (payments.record) or an advance (advances.receive). Record the payout to the bank with transfers.create; while the processor balance is a receivable (the default), the cash flow statement shows the payout as an operating cash inflow.

Assets

  • righto assets record-depreciation: Record depreciation (command). Record depreciation from the user’s schedule: an expense debit and an accumulated depreciation credit. Righto does not calculate depreciation. Ask the user or their accountant for the amount.
  • righto assets dispose: Dispose fixed asset (command). Sell or scrap a fixed asset for cash. Give its cost and accumulated depreciation. Proceeds go to a bank, cash, or processor account. A gain goes to an income account and a loss to an expense account. The amounts cannot be more than the account balances. Give cashAccumulatedDepreciation only when the service asks for it. Righto does not record a sale on credit.

Register

  • righto register list: List all activity (query). List all activity: bank lines, entries, bills, and receivables, one row each. A posted or matched bank line shows once, with its event IDs. A transfer shows once. amountMinor is signed: money in is positive. Filters combine with AND. search finds text in the description, payee, notes, line notes, reference, and amount (“12.34”). Each row has its account reconciliationState. The default is newest first. Use nextCursor with the same filters and sort for the next page.

Reports

  • righto reports get: Get report (query). Read a Profit and Loss (inclusive start and end dates) or Trial Balance (as of a date) on the cash basis.
  • righto reports profit-and-loss: Profit and Loss (query). Read income, expenses, and net income for inclusive start and end dates on the cash basis.
  • righto reports balance-sheet: Balance Sheet (query). Read assets, liabilities, and equity as of a date on the cash basis. The fiscal year start defaults to January 1 of the report year.
  • righto reports trial-balance: Trial Balance (query). Read the debit and credit balance of each account as of a date on the cash basis.
  • righto reports general-ledger: General Ledger (query). Read journal lines and running balances for inclusive start and end dates on the cash basis, for all accounts or one account.
  • righto reports cash-flow: Cash Flow statement (query). Read the cash flow statement for a date range on the cash basis. Give startDate and exactly one of endDate or endDateExclusive.
  • righto reports unresolved-items: Unresolved items report (query). List activity in Needs Review accounts and in accounts that the cash flow statement cannot classify, with the transaction count and the gross debits and credits. Activity that nets to zero is still listed. Resolve it before the books go to an accountant.
  • righto reports analytics: Income and expense analytics (query). Total cash-basis income, expense, and net for a date range, grouped by month, category, account, counterparty, or tag. Give startDate and exactly one range end. Tag groups can overlap. An account filter takes only income and expense accounts.
  • righto reports compare: Compare report ranges (query). Compare a cash-basis Profit and Loss or Cash Flow report for two date ranges. Each range has startDate and exactly one of endDate or endDateExclusive. The change is current minus prior.
  • righto reports drill-down: Drill into figure (query). List the journal lines behind one account figure. Give a range (startDate and one range end) for activity without the opening entry, or asOfDate for a balance. Do not give both. Use nextCursor to get the next page.
  • righto reports vendor-payments: Vendor payments report (query). Total the posted money paid out to each linked counterparty for inclusive start and end dates. Reversals are subtracted on their own date. The result is not a tax reporting decision.
  • righto reports export: Export report file (query). Make one cash-basis report as a CSV or PDF file and return its bytes as base64, in chunks of at most 512 KiB. For each later chunk, send the same input with offset set to nextOffset, and with the generatedAt and snapshotSequence values of the first chunk.

Setup

  • righto setup apply-template: Apply chart template (command). Add the accounts of one starter chart template. Use it only once, before the first posted activity. Existing account codes and single roles must not conflict with the template. The legal entity type sets the equity account names; the tax classification turns on Officer Compensation (S or C corporation) and the income-tax accounts (C corporation). Without them, the answers in the settings apply.
  • righto setup create-financial-accounts: Create financial accounts (command). Create 1 to 50 bank, credit card, cash, or processor accounts in one commit. A missing code gets the next free code: 1000 to 1099, or 2100 to 2199 for a card. The display name defaults to the name.
  • righto setup preview-opening: Preview opening balances (query). Build the opening balances from simple inputs and show the summary or the problem. Nothing is saved. Use the same input for setup.postOpening.
  • righto setup post-opening: Post opening balances (command). Build and post the opening balances from simple inputs. Use it only once, before any posted activity. The books start date moves to the opening date. If the opening does not balance, the service gives the difference.

Reminders

  • righto reminders apply-federal-template: Add federal tax dates (command). Add the suggested federal estimated tax due dates for one tax year. Righto does not calculate tax amounts. Check each date. A tax year can have the suggested dates only once. If a reminder that is not archived has the title and date of a suggested date, the command fails with details.code DUPLICATE and adds nothing.
  • righto reminders create: Create reminder (command). Create one dated reminder. A reminder with the same date and title is refused as a duplicate.
  • righto reminders update: Update reminder (command). Change the title, due date, note, or review flag of one reminder. Supply its revision and at least one change. An archived reminder cannot change.
  • righto reminders complete: Complete reminder (command). Mark one reminder complete. You can link the posted event of the payment.
  • righto reminders reopen: Reopen reminder (command). Mark one complete reminder as not complete. This removes the linked event.
  • righto reminders archive: Archive reminder (command). Archive one reminder. An archived reminder cannot change and is not listed unless includeArchived is true.
  • righto reminders list: List reminders (query). List reminders by due date, with possible duplicates. The dates are inclusive. Complete and archived reminders are not included by default.
  • righto reminders export-calendar: Export reminder calendar (query). Make an .ics file of the reminders for Apple Calendar, Google Calendar or Outlook, one all-day event each. Save content as fileName. It is a one-time copy: after a date changes, export again; an import updates the same events. Archived reminders are not included, and complete ones only with includeCompleted. The file has dates, titles and notes. Righto does not calculate tax amounts.

Overview

  • righto overview get: Get business overview (query). Read the Overview in one call: the balance and reconciliation state of each financial account, a Profit and Loss summary, open and overdue bills and receivables, the count of data integrity items by severity, and the next reminder. The Profit and Loss is on the cash basis. The default range is the fiscal year to date.

Integrity

  • righto integrity list: List integrity items (query). List the data integrity items of the business, sorted by severity (BLOCKING, WARNING, INFO) and code. Each item has a stable code, a message, a count, up to 500 record IDs, and the operation that opens the records.

Sources

  • righto sources categorize: Categorize bank line (command). Post one unlinked bank line to income, expense, or other category accounts. The line amounts must add up to the bank amount exactly; a negative line reverses the usual side. If a recorded entry may be this activity, the service refuses; match it, or set confirmNoMatch to true.
  • righto sources match: Match bank line (command). Link one unlinked bank line to a recorded entry (EVENT), or record it as a payment of a bill or receivable (OPEN_ITEM), as the arrival of a transfer (TRANSFER), or as a card payment (CARD_PAYMENT). The amount and direction must agree. Use sources.suggestMatches to find targets.
  • righto sources mark-transfer: Mark bank transfer (command). Record one unlinked bank line as a transfer to or from another financial account. Give the line of the other account if it is imported; the two amounts must be equal and opposite. A transfer between a bank and a card is a card payment.
  • righto sources unlink: Unlink bank line (command, Reverses or reopens). Remove the link of one bank line. If the posting came from the line, the service posts a reversing event; the original stays in history. If the line was matched to a manual entry, the entry stays posted and only the link ends. A done line becomes open again.
  • righto sources exclude: Exclude bank lines (command). Exclude imported bank lines that must not go into the books, for example a duplicate import. Give statementItemId, or statementItemIds (at most 500, all or none). The line stays as evidence. It leaves the unposted work and statement coverage, and cannot be posted or linked until sources.include. A linked line is refused (ALREADY_LINKED): use sources.unlink first. Later verified reconciliations of the account are invalidated. operations.undo includes the lines again, if they did not change later.
  • righto sources include: Include bank lines (command). Include excluded bank lines again, so they return to the unposted work. Give statementItemId, or statementItemIds for at most 500 lines; all lines change or none do. Each line must be excluded now. A verified reconciliation of the account that ends after the line date becomes invalidated. operations.undo excludes the lines again with the earlier reason, if they are not linked or changed later.
  • righto sources list: List bank lines (query). List bank lines with link status, linked event, review state, and exclusion. Filters are optional. Use status UNPOSTED to find the lines that need work (excluded lines are not in it). Use status EXCLUDED to see excluded lines and their reasons.
  • righto sources suggest-matches: Suggest bank matches (query). Read the recorded entries, open items, and transfers that may match one bank line, best first. Nothing is applied. A linked line has no suggestions.
  • righto sources line-notes: Get line notes (query). Read the notes of the split lines of one posted event.
  • righto sources list-statement-items: List statement items (query). List committed statement items with dates, amounts, descriptions, and whether a ledger event uses them. Filters are optional; the dates are inclusive and postedFrom must be on or before postedTo. Use nextCursor as cursor to get the next page.
  • righto sources get-statement-item: Get statement item (query). Read one statement item with its raw source row, the normalized values, its versions, and its evidence links.

Rules

  • righto rules create: Create rule (command). Create a categorization rule. A rule does nothing until rules.apply runs. Use rules.simulate first to see which lines it matches. Accounts, tags, and counterparties must exist.
  • righto rules update: Update rule (command). Change one rule. Give the current version and at least one change. The service makes a new rule version. Earlier postings keep the version that made them.
  • righto rules set-enabled: Enable or disable rule (command). Enable or disable one rule. The value must change. A disabled rule does not apply.
  • righto rules delete: Delete rule (command). Disable one rule and mark it deleted. Its versions and applications stay in history. Earlier postings do not change.
  • righto rules reorder: Reorder rules (command). Set the order of the rules, highest priority first. Each ID can occur once. The service changes the priority of the rules that move.
  • righto rules create-from-activity: Create rule from line (command). Make a rule from one bank line and a category account. Without confirm true, the service refuses and returns the proposed rule and its preview counts. Send it again with confirm true to save. The name cannot be blank; use at most 20 tag IDs, each once.
  • righto rules apply: Apply rules (command). Run the enabled rules on bank lines and post the results. With no filter, it scans every bank line. It posts at most 100 lines in one command and lists the rest as deferred. Conflicts, possible matches, and earlier decisions are not changed; they are listed for review.
  • righto rules list: List rules (query). List the rules with conditions, outcome, priority, version, and application counts. Rules with the same priority are marked.
  • righto rules get: Get rule (query). Read one rule with all of its versions.
  • righto rules simulate: Simulate rule (query). Show which bank lines a rule would match and what it would do. Nothing changes. Give exactly one of ruleId (a saved rule), rule (a draft), or fromActivity (a rule made from one line).
  • righto rules applications: List rule applications (query). List the automatic rule decisions, newest first: applied, skipped, or conflict, with the rule version and the exact condition that matched. Filters are optional.

Counterparties

  • righto counterparties create: Create counterparty (command). Create a vendor, customer, or both. The display name is trimmed. All other fields are optional.
  • righto counterparties update: Update counterparty (command). Change the fields of one counterparty. Supply its revision and at least one change. Use null to clear an optional field. An archived counterparty must be restored first.
  • righto counterparties archive: Archive counterparty (command). Archive one counterparty, or restore it with archived false. Archive keeps its history and its links to activity.
  • righto counterparties list: List counterparties (query). List vendors and customers with IDs and revisions. Archived counterparties are not included unless includeArchived is true.
  • righto counterparties get: Get counterparty (query). Read one counterparty with all its fields, including the tax identifier note.
  • righto counterparties history: Counterparty history (query). Read each saved version of one counterparty, oldest first.

Tags

  • righto tags create: Create tag (command). Create a tag that you can assign to activity. The name is trimmed.
  • righto tags update: Update tag (command). Rename a tag or change its description. Supply its revision and at least one change. An archived tag must be restored first.
  • righto tags archive: Archive tag (command). Archive one tag, or restore it with archived false. Existing assignments stay. An archived tag cannot be assigned again.
  • righto tags list: List tags (query). List tags with IDs, revisions, and usage counts. Archived tags are not included unless includeArchived is true.
  • righto tags history: Tag history (query). Read each saved version of one tag, oldest first.

Activity

  • righto activity annotate: Annotate activity (command). Set the display text, note, counterparty, or tags of one posted event or statement line. This does not change the ledger. Give at least one field. Tags replace all current tags. Assign each tag once to the item and once to each line.
  • righto activity set-review: Set review state (command). Mark one posted event or statement line OPEN, DONE, or NEEDS_ATTENTION. The service records who made the change. Give only text in the explanation. ruleId and ruleVersion are for Righto rules, and the service refuses them from an agent.
  • righto activity get: Get activity annotation (query). Read the current annotation and review state of one posted event or statement line. The revision is null when there is no annotation.
  • righto activity history: Activity annotation history (query). Read each saved annotation version of one posted event or statement line, with the changed fields and their values before and after.
  • righto activity list-annotations: List activity annotations (query). Read the stored annotations of up to 1000 posted events or statement lines in one request. An item without an annotation is not in the result.

Statements

  • righto statements create: Create statement (command). Record a bank or card statement period for one financial account. The end date is exclusive. Dates and the ending balance can come from one committed import. A typed balance is confirmed; an imported balance stays DRAFT until confirm is true. Periods of one account cannot overlap.
  • righto statements update: Update statement (command). Change the dates, balances, or note of one statement, or confirm it. Supply its version. A change of dates or balances invalidates a verified reconciliation of that statement and the later verified periods.
  • righto statements list: List statements (query). List statements with their periods, balances, balance source, state, and versions. The financial account filter is optional.

Reconciliations

  • righto reconciliations start: Start reconciliation (command). Start a DRAFT reconciliation of one statement. Movements linked to its statement lines are cleared automatically. A statement can have only one draft at a time. The first period of an account must start on the books start date; a later one starts where the last verified period ends. The result check lists what still blocks verification.
  • righto reconciliations set-cleared: Set cleared items (command). Mark ledger movements or statement lines cleared or not cleared in a DRAFT or REVIEWED_NOT_VERIFIED reconciliation. Give at least one ID. The result shows the new difference and the unresolved lines.
  • righto reconciliations verify: Verify reconciliation (command). Mark a reconciliation VERIFIED. All statement lines must be accounted for, and the opening boundary plus cleared items must equal the statement ending balance. If not, the service lists the differences.
  • righto reconciliations mark-reviewed: Mark reconciliation reviewed (command). Mark a reconciliation REVIEWED_NOT_VERIFIED when its statement has no ending balance. All statement lines must be accounted for. A statement with an ending balance must be verified instead.
  • righto reconciliations reopen: Reopen reconciliation (command). Reopen a VERIFIED reconciliation. It becomes INVALIDATED with your reason, and each later verified period of the same account also becomes INVALIDATED. Start a new reconciliation to verify the period again.
  • righto reconciliations auto-verify: Auto-verify from import (command). Try to verify a period from one committed import that has a trusted ending balance. If every statement line is accounted for, the service creates the statement and a VERIFIED reconciliation. If not, it writes nothing and gives the reasons.
  • righto reconciliations list: List reconciliations (query). List reconciliations with state, version, period, and balances, and the related statements. The financial account filter is optional.
  • righto reconciliations get: Get reconciliation (query). Read one reconciliation with its statement, cleared items, statement lines, history, and a live check while it is open.

Reporting

  • righto reporting query: Run reporting query (query). Run one read-only SELECT over the reporting views (rv1_*) of the current business. Base tables and writes are refused. Call reporting.schema first to get the views, columns, and rules. Use ? parameters. Money is integer cents. Filter the views that have a basis column with basis = ‘CASH’. The SQL is at most 64 KiB as UTF-8.
  • righto reporting schema: Get reporting schema (query). List the reporting views that reporting.query can read, with columns, meanings, basis notes, allowed functions, rules, and limits.

Attachments

  • righto attachments attach: Attach file (command). Attach an uploaded file to an event, statement item, open item, or counterparty. First upload the file with righto upload (CLI) or righto_v1_uploads_add_file (MCP). Programs and scripts are refused. A record can have at most 200 files. A file never changes an accounting value.
  • righto attachments rename: Rename attachment (command). Change the display name of one attachment. The name must change. The file bytes do not change.
  • righto attachments link: Link attachment (command). Attach an existing file to one more record. The file must not already be on that record. The file is not copied.
  • righto attachments unlink: Unlink attachment (command). Remove a file from one record. The file stays in the business file, and the link history stays in the record.
  • righto attachments replace: Replace attachment (command). Replace a file on one record with an uploaded file. The old file stays in the history. First upload the file with righto upload (CLI) or righto_v1_uploads_add_file (MCP). The old file must be on the target record.
  • righto attachments get: Get attachment (query). Read the metadata of one attachment: name, media type, size, SHA-256, revision, and links. Set includeHistory to also read its earlier versions.
  • righto attachments list: List attachments (query). List attachments, for all records or for some records. Give target or targets, not both. With targets, the result also has the file count of each record. Use nextCursor as after to get the next page.
  • righto attachments read: Read attachment bytes (query). Read part of the bytes of one attachment as base64 text. One call reads at most 524288 bytes. Use nextOffset as offset to read the next part. The offset cannot be after the end of the file.

Imports

  • righto imports seal: Seal upload (command). Close a complete upload and keep its bytes as a sealed source. First upload the statement file with righto upload (CLI) or righto_v1_uploads_add_file (MCP). The result has the sourceBlobId for imports.detectFormat and imports.preview, and earlier imports of the same bytes.
  • righto imports cancel-upload: Cancel upload (command). Cancel an open upload that you started. A canceled upload cannot be sealed or attached.
  • righto imports preview: Preview statement import (command). Read a sealed source into a new import batch for one financial account. Nothing is posted. Give the settings for the format only: csv for CSV, ofx for OFX and QFX, and optional pdfText for PDF_TEXT. For CSV, use csv.suggestion.previewInput from imports.detectFormat after you confirm its needsConfirmation items. If the state is READY_TO_COMMIT, call imports.commit; otherwise decide the rows with imports.decide.
  • righto imports decide: Decide import rows (command). Decide 1 to 1000 rows of an open import batch, one decision per row. ACCEPT makes a new statement item. SKIP excludes the row. LINK needs statementItemId (a duplicate candidate). CORRECT needs correction and reason. An uncertain row or a possible duplicate also needs a reason that states your check.
  • righto imports cancel-batch: Cancel import batch (command). Cancel an import batch that is not committed. No statement items are made. A committed batch cannot be canceled.
  • righto imports commit: Commit statement import (command). Make statement items from the decided rows of an import batch. It posts no ledger event; next, use rules.apply, sources.categorize, or sources.match on the new lines (sources.list status UNPOSTED). Send the latest previewDigest (from imports.preview, imports.decide, or imports.getBatch) and any previewToken. A PDF_TEXT import needs confirmPdfReview true after you check each row.
  • righto imports detect-format: Detect statement format (query). Read a sealed source and suggest its format and settings: CSV columns, OFX statements, or a PDF text layout. For CSV, csv.suggestion.previewInput is a full imports.preview input. Confirm each needsConfirmation item against the file (change the mapping if it is wrong), then send previewInput to imports.preview. Give financialAccountId to fit the sign to the account kind. A PDF file is refused.
  • righto imports list-batches: List import batches (query). List import batches, newest first, with state, counts, and statement balances. Filters are optional. Use nextCursor as cursor to get the next page.
  • righto imports get-batch: Get import batch (query). Read one import batch with its rows, duplicate checks, issues, decisions, and the previewDigest for imports.commit. Use nextAfterOrdinal as afterOrdinal to get the next page. Set only to NEEDS_ATTENTION to read only the rows that need a decision.

Operations

  • righto operations undo: Undo operation (command, Reverses or reopens). Undo one command, or all commands with one trace ID. Give exactly one of commandId or traceId. Undo makes a new reversing record: it posts reversing events, writes a restoring version, or adds the opposite exclusion row for sources.exclude and sources.include. Posted records and the audit history stay unchanged. An agent can undo only its own commands. First call operations.previewUndo to see the plan. This command has no dry run.
  • righto operations preview-undo: Preview undo (query). Show what operations.undo would do for one command or one trace ID, and change nothing. Give exactly one of commandId or traceId. The result has the plan (safe, code, reason, affected commands) and the reversals, restored records, and exclusion changes. It does not change the business revision.
  • righto operations list: List operations (query). List audited commands, newest first, with actor, operation, time, and undo state. Filters are optional; from must be before to. Use nextCursor as cursor to get the next page.
  • righto operations for-record: List record operations (query). List the audited commands that changed one record, newest first. Use nextCursor as cursor to get the next page.
  • righto operations get: Get operation (query). Read one audited command with its receipt, the records it changed, and whether you can undo it. The result data of another principal stays hidden.

Exports

  • righto exports plan: Plan export (query). Show the size, entry count, and exceptions of an export before you read it. ALL_DATA is the full business. YEAR_END is a cash-basis package for an accountant for a date range. Next, call exports.allData or exports.yearEnd with the same options to get the token and the entry list.
  • righto exports all-data: List all-data entries (query). List the entries of a full business export, 500 for each page. The first call starts the export and returns an opaque token. For later pages, send only the token and nextCursor. Then read each entry with exports.readEntry. If the business changes, start again.
  • righto exports year-end: List year-end entries (query). List the entries of a year-end package, 500 for each page. The first call needs startDate and endDate and returns an opaque token. For later pages, send only the token and nextCursor. Then read each entry with exports.readEntry. The package is not a tax return.
  • righto exports read-entry: Read export entry (query). Read the bytes of one export entry as base64, in chunks of at most 512 KiB. Use the token and an entry path from exports.allData or exports.yearEnd. The path manifest.json gives the manifest. Continue with nextOffset until it is null. Check the sha256 value.

Migration

  • righto migration detect: Detect migration files (query). Say what each sealed export file from QuickBooks Online, QuickBooks Desktop, or Xero is: an account list, contact list, trial balance, open invoices or bills, or history. Shows the system, row counts, the trial balance totals and date, and the problems found. Nothing is written.
  • righto migration preview: Preview migration import (query). Build the full import plan for a new business: the chart, bank and card accounts, contacts, opening balances and open invoices and bills. Nothing is written. If ready is false, fix each BLOCKING issue (add a file, a mapping, or dateOrder) and preview again. Give planDigest to migration.commit.
  • righto migration commit: Commit migration import (command). Write the plan from migration.preview to a business that has no chart and no activity: the accounts, financial accounts, contacts, one opening event and the open items. Send the same input as the preview and its planDigest. A changed file or business gives PREVIEW_STALE. This cannot be undone.

Proposals

  • righto proposals create: Propose changes (command). Suggest 1 to 50 commands for the owner to review; a Propose-level connection must use this instead of running commands. Each item names a command operation from this catalog (not proposals.* or agents.*) and its exact input; the service runs a preview that it rolls back, and nothing posts until the owner approves in Righto.
  • righto proposals list: List proposals (query). List the proposals that this connection made, with status and preview. Filters are optional.
  • righto proposals get: Get proposal (query). Read one proposal that this connection made, with its decisions and whether its preview may be stale.
  • righto proposals approve: Approve proposal (command). Approve one pending proposal, or every pending proposal in a batch, and post its changes. Full access only. A connection cannot approve proposals that it made. Give exactly one of proposalId or batchId. Check each item with proposals.get first.
  • righto proposals reject: Reject proposal (command). Reject one pending proposal, or every pending proposal in a batch. Nothing is posted. Full access only. Give exactly one of proposalId or batchId, and say why in explanation.
  • righto proposals withdraw: Withdraw proposal (command, Reverses or reopens). Withdraw one pending proposal, or every pending proposal in a batch, that this connection made. Give exactly one of proposalId or batchId.

Commands

  • righto commands get-result: Get command result (query). Read the stored receipt for an idempotency key that this connection used. Use it after a command outcome is unknown, before you retry.