All pages

Guide for AI agents

How an AI agent should work in Artoz through MCP. Read this before changing anything.

You are working in a small business’s double-entry books. Accuracy matters more than speed.

Before acting

  • Use the tools for every figure. Never estimate or invent numbers.
  • Amounts are in the reporting currency unless a currency is given. Dates are YYYY-MM-DD. Currency codes are ISO 4217 (USD, EUR, IDR…); anything else, like “Rp”, is refused with the code it most likely means.
  • Periods follow the app’s standard: tools with from/to also take period, a preset such as “This month”, “Last month”, “Last quarter”, “Year to date”, “Last year” or “Last 12 months” (whole months to the end of last month in reports, rolling to today in ledgers and searches). Years and quarters follow the fiscal year, which starts in fiscal_year_start_month from get_overview; “This …” is the whole period. as_of takes a date or “Today”, “End of last month”, “End of last quarter”, “End of last year”, “End of this year”. Without dates a report covers This month and a balance today, as the app opens.
  • Use list_accounts for account codes; never guess a code.
  • Check what you may do: every change is checked against the user’s settings. Allow records it at once; Ask first saves a draft or returns needs_approval; Off is refused. Say plainly which happened. If a call says Artoz is asking the user to allow you, tell them to click Allow in Artoz, then try again. export_pdf takes password to lock the PDF; tell the user to send the password separately, never in the same email.
  • Call list_workspaces to see every set of books. Tools use the one open in Artoz unless you pass workspace, and each answer ends with “Books: …”. Use create_workspace only when the user asks for new books.

Rules

  • Entries must balance: debits equal credits in the reporting currency.
  • Closed periods can’t be changed. Pick a date after the closing date for corrections.
  • Don’t delete: void or reverse posted entries, void issued documents.
  • Artoz never moves money. Recording a payment only records that money moved.
  • Some accounts are hidden: you’ll only see their totals. Don’t ask for or infer their lines.
  • Tax figures are estimates, not advice.
  • To send a document, call export_pdf and attach the file it returns with your own email tool. Artoz never sends email itself.

Setting up books

  • To set up books from a balance sheet, trial balance or old chart of accounts, send it all in one propose_setup: accounts, opening balances, contacts, tax codes, business details and settings. Reuse codes from list_accounts. On new books call get_setup first: it lists what’s left and the files the user handed over; tick or mark steps with update_setup and post short progress lines as you work.
  • Opening balances go on each account’s usual side (assets as debits, liabilities and equity as credits), dated the day before the books start. Any difference goes to 3900 Opening balance equity; tell the user if it isn’t zero.
  • Setup changes ask first by default: the user reviews the proposal in Artoz and applies it as one change. Calling propose_setup or save_account again adds to the same proposal.
  • For many transactions use record_transactions. For a bank statement CSV use import_statement: preview first, then commit with categories for the rows that need one.
  • Business details in propose_setup take address, phone, email, website, tax ID and registration_number; contacts take contact_person (printed as “Attn.”). How invoices look you can set with save_brand, for a brand or (by its name) the main brand; logo images are uploaded by the user.

Sales and costs

  • A sale that is already paid, or one the user just asks you to “record”, goes in directly with record_transactions: money in on the bank or cash account against an income account. No invoice and no receivable. A cost already paid is the same, as money out against an expense account.
  • Use draft_document only when the user asks for an invoice or bill, or says the money is owed and paid later.
  • If you can’t tell, record it directly, then offer in one line to make an invoice as well. Ask only when you can’t tell which account the money went through.

Running the month

  • Start with list_activity and list_proposals: see what changed, what the user undid, and what’s still waiting.
  • A draft invoice has no number until it’s issued: draft results give number null and an id, so refer to it by that id. issue_document returns the number it took. Quotes and bills are numbered when saved.
  • Invoice PDFs never mention who drafted them, so nothing on the paper says an AI app made it.
  • Fix your own drafts with edit_draft_entry and edit_draft_document, or delete them. Void issued invoices and bills with void_document; never delete posted work.
  • Posted entries: void_entry (with a reason) takes one out of the books and keeps it, crossed out; recategorize_entry moves it to another account, and the user sees the change in the entry’s History. Neither works in closed periods or on entries an invoice, bill, payment, trade or tax return made (change those there), and entries matched in a finished reconciliation can’t be voided. The user can edit, restore or undo any of it in Transactions.
  • Reconcile with reconcile_account and the statement CSV. Record statement lines that have no entry, tick near matches only when they’re the same, and leave finishing to the user unless they allow it. A statement with nothing ticked only finishes with no_transactions: true, when the statement really shows no transactions.
  • Keep rates current with set_exchange_rate and categories consistent with save_import_rule. For investments, list_holdings shows them (stale prices flagged); save_holding adds one, record_trade books buys, sales, income and fees, set_prices takes prices you looked up yourself (Artoz never fetches them) and revalue_holdings books month end. They ask the user first unless allowed. rename_holding_name renames or removes where holdings are held or a holding group, and rename_account_group does the same for account groups; a name already in use merges, and names you pass are matched to ones in use.
  • Plan with save_recurring, save_budget, save_goal and save_scenario. Read the rest with get_report and get_tax_returns. A return the user filed is marked with file_tax_return (nothing_owed, not_paid, or entry when an entry already in the books paid it); pay_tax_return posts a payment. Check possible_payments in get_tax_returns before paying, so a payment already imported isn’t recorded twice. list_upcoming lists what has a date: due dates, recurring items, quotes about to expire and tax deadlines; the user gets Mac reminders for these on the days they chose.
  • Correct issued invoices and bills with credit_document, record_refund and remove_payment; void only documents without payments.
  • For a contract paid in parts, give draft_document a payment_plan: each_term (work done over time) bills each term on its own date and Artoz posts it then; up_front (goods or finished work) bills it all on issue. Payments go to the oldest unpaid term. list_documents shows every term and next_due; export_pdf with term makes the payment request for that term. Ask the user before changing amounts on an issued invoice: they can correct it in Artoz while it’s unpaid. Lines take an optional unit (printed as “20 pcs”) and either discount_percent or discount_amount; income and tax are booked after the discount.
  • A business can sell under several brands; get_overview lists them, the first being the main one. Pass brand to draft_document for an invoice under another brand (it takes that brand’s numbers and design), and reference for the customer’s PO number. list_documents filters by brand. list_brands shows each brand’s details; save_brand adds or changes one and delete_brand removes one that has no invoices yet; a brand in use only the user can delete. Both wait for the user’s approval unless they allow brand changes. save_brand takes show_tax_id to leave the company’s tax ID off a brand’s invoices, and the invoice options: logo_on_invoice (auto, square, wide, none), show_name, business_details (beside_customer or footer), spacing, discounts (column or under_line), number_separators (language, 1,234.56, 1.234,56, 1 234,56), currency_display (symbol or code) and titles per invoice language, e.g. {"id": {"invoice": "Invoice"}}. For the main brand, only these look options, design, color and footer change.
  • For how the business is doing over time, get_business_metrics gives all-time revenue, revenue and profit over the last 12 months, and growth against the 12 months before and the same month last year. Growth is null until the books cover that period: say so rather than estimate it.
  • When a change waits for approval, say so; list_proposals shows what the user approved or declined. Pass reason so they know why.
  • Keep the evidence: attach_file puts a receipt or bill PDF on its entry or document. Bring history over with record_journal_entries; quote with draft_document kind quote and update_quote; repeat invoices with save_recurring and invoice_from. Repeating bills use bill_from; frequency daily with interval 30 is every 30 days, and times stops it after that many.

After acting

Every change you make is marked as yours and appears in the user’s Activity, where they review and can undo it. Tell them what you changed, with numbers, so it’s easy to check.