Start free

Accounting and projects with your AI

Cenaly Books v2 books, chart of accounts, trial balance, bank posting, adjustments, tax worksheets, month-end close with confirmation, projects, cost centres and budgets — over MCP

16 min read Admin panel demo
On this page 20

Accounting, Cenaly Books v2, postings & projects with AI

For chief accountants, CFOs, business owners and integrators: connect your Claude, ChatGPT/Codex or Google Antigravity client to your Cenaly account (connection guide) and work with Cenaly Books v2 double-entry ledgers, reconcile bank statements, inspect trial balances and tax worksheets, review project P&L by cost center and run month-end close audits in plain language.

The financial layer exposes 59 MCP tools across three domains:

  • accounting (44 tools: 33 R0, 5 R1, 6 R2) — legal entity books (mgmt, statutory, tax, ifrs), chart of accounts, ledger postings, book bank (books_bank_*), cash orders, expense journal, manual adjustments, reconciliations, tax worksheets, regulatory forms and month-end close;
  • management (7 tools: 6 R0, 0 R1, 1 R2) — P&L and cash-flow articles, cost centers (ЦФО), management projects, budgets, plan-vs-actual variance and the book-to-book reconciliation bridge;
  • bank (8 tools: 5 R0, 1 R1, 2 R2) — operational “Counterparties → Bank” (bank_*) for linking bank payments to CRM counterparty cards and invoices.

In this article: entityId and book vs locationId, how bank_* differs from books_bank_*, entity, permissions & chart discovery, trial balance, postings & financial statements, reconciling the book bank, expenses, cash orders, adjustments & opening balances, sub-ledgers, acquiring, money, assets & stock, tax worksheets & forms, month-end close with confirmToken, management accounting, projects, budgets & book bridge.

Unlike storefronts, warehouses or team task boards, accounting in Cenaly belongs to a legal entity (company / sole proprietor) rather than a storefront point:

  • Every tool in accounting (44 tools) and management (7 tools) takes a required entityId parameter (obtained from books_entities or the dynamic resource cenaly://account/vertical-profile).
  • A single legal entity can maintain multiple parallel books (book from books_entities or books_list):
    • "mgmt" — management accounting book;
    • "statutory" — national statutory accounting book governed by the entity's country pack;
    • "tax" — tax accounting book;
    • "ifrs" — IFRS book.
  • Omitting book targets the legal entity's primary book.

2. The two bank contours: bank_* vs books_bank_*#

Cenaly intentionally separates operational CRM bank matching from double-entry accounting book reconciliation. An AI agent must never mix their identifiers or tools (also documented in-protocol at cenaly://guide/crm-vs-books):

Dimension “Accounting → Book Bank” (books_bank_*) “Counterparties → Bank” (bank_*)
Audience & purpose For accountants: classifies statement rows by accounting class (class + attrs) or v2 decision to post double-entry ledger lines across the entity's books (books_postings, books_ledger_lines) For managers and sales ops: links incoming and outgoing bank payments to CRM counterparty cards (counterpartyId) and commercial invoices (docId) to update operational receivables and payables (crm_ledger_get, crm_payables_ledger)
Scope identifier entityId (from books_entities) + optional book locationId or domain="CODE" (from list_locations) + accountKey (from bank_list_accounts)
Statement row identifier itemId (starts with "bank:", from books_bank_lines) + month="YYYY-MM" opId + month="YYYY-MM" (from bank_search_operations)
Read / preview tools books_bank_lines (include: ["classes", "rules", "balances", "imports"]), books_bank_v2_preview bank_list_accounts, bank_search_operations, bank_get_operation, bank_suggest_links, bank_import_status
Write / link tools books_bank_v2_decide (R2 money, confirmMode: "token_optional" paired with books_bank_v2_preview), books_bank_decide (R2 money, confirmMode: "hint") bank_link_operations (R2 money, confirmMode: "hint"), bank_upload_statement (R1), bank_refresh (R2 integration — cenaly.ru only)

How payment linking works in “Counterparties → Bank” (bank_*)#

  1. Call bank_list_accounts for the location (locationId) to discover accountKey, currency and covered months.
  2. On cenaly.ru, the account owner can pull fresh bank statements directly from Russian bank APIs (Tochka, T-Bank, Modulbank, Raiffeisen) via bank_refresh (action: "status" | "sync" | "resync" | "balances" | "events" | "test"). On any contour, statement files (1C, MT940, camt, OFX, CSV, XLSX) can be uploaded with bank_upload_statement and checked via bank_import_status.
  3. Fetch automated match suggestions via bank_suggest_links ({ locationId, accountKey, months: ["2026-10"] }) and unlinked operations via bank_search_operations ({ locationId, accountKey, from: "2026-10-01", to: "2026-10-31", link: "unlinked" }).
  4. For unmatched rows, look up counterparties by tax ID or name via crm_find_counterparties and open invoices via crm_find_documents (awaitingPayment: true).
  5. Present the proposed link table to the user and, after explicit confirmation, call bank_link_operations (mode: "confirm_suggestions" or "manual"). Note: there is no unlink tool in MCP — erroneous links are reversed in the counterparty ledger in the admin app.

3. Discovering entities, permissions, chart of accounts and accountant tasks#

Start every accounting workflow with these 5 read calls (R0):

  1. books_entities with {} — lists the account's legal entities (entityId, name, country, archived status). (If a staff user lacks permission to list all entities and receives 403, read cenaly://account/vertical-profile or ask the user for entityId.)
  2. books_entities with { entityId, period: "2026-10" } — returns the caller's accounting permissions (acct.read, acct.review, acct.post, acct.close, acct.close.override, acct.settings), the country pack ("ge", "ru", "tr", etc.) and books[].
  3. books_list with { entityId, period: "2026-10" } — inspects all books of the entity (id, kind, accounting basis, functional currency, chart ID, read-model revision).
  4. books_readiness and books_actions with { entityId, period: "2026-10" } — checks engine version (v1/v2), source coverage and the prioritized accountant to-do list (blocker, high, medium, low) with canExecute.
  5. books_chart and books_policy_get with { entityId, book? } — loads postable leaf account codes, normal side (D/C), required analytic dimensions (dims[]) and accounting policy settings (include: ["document", "adjustment"]).

4. Trial balance, postings and financial statements#

Tool Risk What it returns and key parameters
books_ledger_lines R0 Books v2 ledger read model: view: "lines" (individual debit/credit lines filtered by year, from, to, account, counterparty, docId), view: "turnover" (trial balance turnovers per account), view: "accounts" (account balances). Paginate with cursor (from next). If 409 stale is returned, the read model was rebuilt — restart without cursor.
books_postings R0 Reads postings, turnovers (view: "turnover") and chart balances (view: "accounts") across both Books v1 and v2.
books_journal_events R0 Searches source journal events for period: "YYYY-MM" filtered by readiness, kind, q.
books_journal_event R0 Full debit/credit entries generated by a single source document (docId).
books_reports R0 Operational accounting reports: report: "trial-balance" (ОСВ), "general-ledger" (single account card), "pnl" (profit and loss) for period (YYYY-MM, YYYY-Qn, YYYY) sliced by location, costCenter, channel, itemCategory, counterparty.
books_statements R0 Country-pack statutory financial statements (balance sheet, P&L, cash flow, equity) for year: "YYYY" or month: "YYYY-MM". Use view: "annual_package" for the full annual package, or explain: "<lineCode>" to trace any line down to accounts and postings.

5. Reconciling book bank statements (books_bank_*)#

Step 1. Inspect statement lines and allowed classes#

Call books_bank_lines:

{
  "entityId": "ent_main",
  "period": "2026-10",
  "status": "unclassified",
  "include": ["classes", "rules", "balances", "imports"]
}
  • balances[] highlights statement-vs-book balance discrepancies per accountKey.
  • classes[] lists valid classification IDs (classes[].id) and their required attributes (classes[].required, such as counterparty, taxId, employee, article).
  • Every statement row is addressed by itemId (starting with "bank:").

Step 2A. Books v2 multi-book decision (books_bank_v2_preview → books_bank_v2_decide)#

In Books v2, a single statement decision generates synchronized postings across all affected books of the entity (mgmt, statutory, tax):

  1. Inspect line context (R0): call books_bank_v2_preview with { entityId, month: "2026-10", itemId: "bank:…" }.
  2. Dry-run postings and mint confirmToken (R0): call books_bank_v2_preview with the proposed decision:
    {
      "entityId": "ent_main",
      "month": "2026-10",
      "itemId": "bank:2026-10-15:004",
      "decision": {
        "kind": "supplier_payment",
        "facts": { "counterparty": "Golden Mill Co.", "taxId": "7701234567" }
      },
      "reason": "Flour supplier payment against invoice INV-GM-1034"
    }
    
    The server validates accounts across all affected books and returns a postings preview, decideArgs and a single-use confirmToken (mct1.*, valid 15 minutes).
  3. Confirm and execute (R2 money, confirmMode: "token_optional"): show the multi-book debit/credit preview to the user, get explicit approval, and call books_bank_v2_decide with { ...decideArgs, confirmToken }.
  4. Fallback to v1: if books_bank_v2_preview returns gate: "decision_v2_disabled", use books_bank_decide (Step 2B).

Step 2B. Standard book bank classification (books_bank_decide)#

Show the proposed class and attrs to the user and, after explicit confirmation, call books_bank_decide (R2 money, confirmMode: "hint"):

  • Classify a row: { entityId, action: "classify", month: "2026-10", itemId: "bank:…", class: "<classId>", attrs: { ... }, learn: { counterparty: true, text: true, amount: false } }.
  • Confirm or reject a suggested document match (status: "suggested"): action: "confirm_match" or "reject_match" with specId and matchId.
  • Other actions: action: "clear" (reset classification), "upload" (upload statement file), "set_balance" (record statement closing balance), "recon" (re-run reconciliation).

6. Primary expenses, cash orders, manual adjustments and opening balances#

Cenaly Books enforces two-stage accounting safety: saving a draft (R1) never alters the general ledger until an R2 posting action is executed with human confirmation.

Scenario Tool chain Safety rules and parameters
Primary business expenses & advance reports (rent, utilities, employee expenses) books_expense_journal_list (R0) → books_expense_journal_save (R2 money, hint) Read: view: "journal" (docs: "missing" finds entries lacking supporting documents), "articles" or "advance_report" (from, to, employee). Write (after user confirmation): action: "add" | "update" | "remove" (baseVersion is required on "update" and "remove").
Cash desk orders (ПКО / РКО) & cash book books_cash_orders_list (R0) → books_cash_order_create (R2 money, hint) Read: view: "orders" | "order" | "cash_book". Always call books_cash_order_create with dryRun: true first (side: "in" | "out", leaf cashAccount and corrAccount from books_chart, amount, partyName, basis) to validate accounts and get the suggested cashFlowItem. Show the preview to the user, then call without dryRun (post: false for draft, post: true to post). Returns 409 cash_orders_unsupported if the chart has no cash sub-accounts.
Manual accounting adjustments (reclassifications, accruals, corrections) books_adjustments (R0) → books_adjustment_save (R1) → books_adjustment_action (R2 money, hint) books_adjustment_save creates or edits a draft (kind: "judgement" | "reclassification" | "estimate" | "error" | "opening" | "autoReversal", effectiveDate, currency, reason, balanced lines: [{ account, dc: "D"|"C", amount }]). Nothing enters the ledger until books_adjustment_action (action: "review" | "approve" | "post" | "void", version).
Bulk operations table import (CSV/XLSX or rows[]) books_operations_import_preview (R0) → books_operations_import_drafts (R1) Run books_operations_import_preview first to validate accounts and balances, then create adjustment drafts in batch via books_operations_import_drafts.
Opening balances & trial-balance import preview books_opening_get (R0) → books_opening_import_preview (R0) books_opening_get (mode: "manual" | "import" | "both", formats: true) inspects opening balances; books_opening_import_preview (asOf: "YYYY-MM-DD", fileBase64) dry-runs an opening trial balance file without writing.

7. Sub-ledgers, acquiring, money, fixed assets and book inventory#

Use these 8 read tools (R0) and 1 linking tool (R1) to reconcile analytical sub-ledgers with general ledger control accounts:

  • Counterparty settlements in books: books_settlements ({ entityId, period: "2026-10", side: "receivables" | "payables" }) checks open documents, linked payments and the invariant “sub-ledger = general ledger control account”. books_settlement_link (R1, action: "check" | "link") re-links payments for a month.
  • Acquiring, delivery platforms & fiscal Z-reports: books_reconciliations with kind:
    • "acquiring" — POS terminal ↔ acquirer report ↔ bank payout (with fee breakdown);
    • "platforms" — delivery aggregators and marketplaces ↔ payouts;
    • "fiscal_days" — fiscal Z-reports ↔ acquiring.
  • Money matrix & 30-day payment calendar: books_money_summary (from, to — expected vs received vs fees vs cash in transit) and books_payment_calendar (30-day cash balance forecast and cash-gap warnings).
  • Fixed & intangible assets: books_assets_list ({ entityId, period: "2026-10" }) — asset register, depreciation schedule and capitalizable purchase candidates.
  • Warehouse vs book inventory reconciliation: books_stock_recon (view: "check" | "balances" | "journal" | "moves", asOf, location) — compares warehouse inventory valuation against accounting book inventory accounts.
  • IFRS & valuation registers: books_registers_list (register: "leases" | "loans" | "valuation" | "calculations" | "subsequent_events").

8. Tax worksheets, regulatory forms and 404 capability_not_in_pack#

National tax worksheets (books_tax_worksheets, R0)#

books_tax_worksheets computes tax bases and verification schedules across 9 worksheet types (kind):

kind value What it computes
"vat" VAT return calculation, purchase/sales books and input VAT credits
"profit" / "profit_return" Corporate profit tax (including distributed profit tax regimes where applicable)
"annual" Annual property and income tax worksheets
"small_business" Small-business turnover journal and threshold tracking
"usn" Simplified Tax System & KUDiR book (Russia country pack: usnView: "rows" | "coverage" | "queue" | "adjustments" | "settings")
"withholding" Withholding tax on payouts
"radar" Tax and registration threshold radar (VAT registration, special-regime caps)
"taxpayer_check" Live public taxpayer registry lookup by taxId

Regulatory forms (books_forms_list → books_form_get → books_form_draft)#

  1. books_forms_list (R0, { entityId, period }) — lists regulatory returns available in the entity's country pack.
  2. books_form_get (R0, { entityId, formId, period, view: "live" }) — computes live form cell values from postings and flags validation issues; pass explain: "<cellId>" to trace a cell down to accounts and source documents.
  3. books_form_draft (R1, { entityId, formId, period }) — saves an immutable draft snapshot of the form. Filing tax returns with government authorities (RS.ge, FNS, etc.) is a forbidden R3 operation and is never exposed in MCP.

9. Month-end close and two-step confirmToken (mct1.*)#

To audit and close an accounting period, use the built-in MCP prompt prompt="month_close_check" or run the following call chain:

Step 1. Four-step readiness audit (R0)#

  1. books_completeness ({ entityId, period: "2026-10" }) — source coverage across bank statements, POS/cash, expenses, payroll and warehouse.
  2. books_exceptions_list ({ entityId, period: "2026-10", status: "active" }) — active accounting exceptions and close blockers.
  3. books_close_status ({ entityId, period: "2026-10", full: true }) — period close state ("open", "softClosed", "hardClosed", "locked"), readiness percentage, checklist items, period-end scheduled jobs (runJobs) and lastRun.
  4. books_settlements, books_stock_recon (view: "check") and books_reconciliations — verify sub-ledger and inventory invariants.

Step 2. Resolve exceptions (books_exception_resolve, R1)#

With the accountant's approval, resolve or accept exceptions: books_exception_resolve with { entityId, id: "exc_…", action: "resolve" | "accept" | "snooze" | "assign", comment: "…" } (comment is mandatory when accepting a blocker).

Step 3. Execute close actions (books_close_action, R2 period-close)#

books_close_action enforces confirmation rules based on the action:

  • Period-end jobs and soft close (action: "runJobs" | "softClose" | "approve" without override: true, confirmMode: "hint"): show the checklist status to the user, get confirmation and call books_close_action ("approve" requires runId from books_close_status).
  • Hard close, lock, reopen or blocker override (action: "hardClose" | "lock" | "reopen" or override: true, confirmMode: "token_required"): the server requires a two-step mct1.* confirmToken:
    1. First call books_close_action with dryRun: true:
      {
        "entityId": "ent_main",
        "period": "2026-10",
        "action": "lock",
        "dryRun": true
      }
      
      (Include a non-empty comment when action is "reopen" or override: true.)
    2. The server verifies permissions (acct.close / acct.close.override / owner for reopen), hashes the live checklist state (sh) and returns the close preview along with confirmToken (mct1.*, valid 15 minutes).
    3. Present the preview to the user and, after explicit confirmation, repeat books_close_action with the exact same arguments (without dryRun) plus confirmToken:
      {
        "entityId": "ent_main",
        "period": "2026-10",
        "action": "lock",
        "confirmToken": "mct1.eyJ2IjoxLCJqdGkiOiJtY18..."
      }
      
    4. If any posting or checklist item changed after the preview, the server rejects the token with 409 confirm_state_changed — run a fresh dryRun: true preview.

10. Management accounting, projects, cost centers, budgets and the book bridge#

The management domain (7 tools, skill cenaly-mgmt-projects) operates on the legal entity's management book (entityId):

  1. Management structure & cost centers (books_mgmt_structure, R0):
    • Call books_mgmt_structure with { entityId, book?, month?: "2026-10" } to load the P&L article tree, cash-flow (ДДС) article tree, cost center (ЦФО) hierarchy and account bindings. If initialized: false is returned, ask the user to initialize a template in Accounting → Management Structure.
  2. Management projects (books_mgmt_projects_list → books_mgmt_project_save):
    • Do not confuse with team tasks (team_*) or CRM deals (crm_deals_*): a management project is a financial slice of the management book over from..to (YYYY-MM) defined by matching rules match[] (center, location, costCenter, counterparty).
    • List projects via books_mgmt_projects_list ({ entityId, includeArchived: true }) and record the directory revision rev (passed as baseRev on writes; concurrent edits return 409 projects_stale).
    • Create or update a project (op: "put", R1): { entityId, op: "put", baseRev, project: { id, name, from: "2026-10", to: "2026-12", match: [{ center: "cc_launch", location: "loc_main" }], responsible, archived: false } }.
    • Delete a project (op: "delete", R2 delete, confirmMode: "token_required"): first call books_mgmt_project_save with { entityId, op: "delete", id: "<projectId>", baseRev, dryRun: true }, show the preview to the user and repeat with the returned confirmToken (mct1.*, valid 1 hour).
  3. Management P&L, cash flow, breakeven & cell drill-down (books_mgmt_report, R0):
    • Entity-wide P&L and cash flow: { entityId, from: "2026-01", to: "2026-10", view: ["pnl", "cashflow"], location? }.
    • Single-project P&L: { entityId, from: "2026-10", to: "2026-10", view: ["pnl"], project: "<projectId>" }.
    • Breakeven analysis: { entityId, from: "2026-10", to: "2026-10", view: ["breakeven"], target?: 500000 }.
    • Drill down to source documents: pass explain: true, article: "<articleId>", center?: "<costCenterId>", month: "2026-10" (plus snap from the previous response).
  4. Budgets & plan-vs-actual variance (books_budgets_list → books_budget_planfact, R0):
    • books_budgets_list ({ entityId }) lists P&L and cash-flow budgets and their version numbers.
    • books_budget_planfact ({ entityId, budgetId }) computes plan, actual and variance (amount and %) across article × cost center × month. Add explain: true, month: "2026-10", article: "<articleId>", center?: "<costCenterId>" to list the exact documents behind any variance cell.
  5. Book-to-book reconciliation bridge (books_bridge_get, R0):
    • When an entity keeps both a management book (mgmt) and a statutory (statutory) or IFRS (ifrs) book, books_bridge_get ({ entityId, from: "mgmt", to: "statutory", period: "2026-10" }) decomposes profit and equity differences into target = source + recognition + measurement + classification + fx + manual + unexplained. Pass line: "<bridgeLineId>" to inspect the individual documents causing the difference.

See also#

Was this article helpful?