Alya Books

    Help centre

    Guides for Alya Books and UAE e-invoicing

    Ledger tools for assistants

    What an AI assistant can read and write in your books over MCP: the read tools behind every report and list, the write tools for customers, items, bills, journals and categorisations, the file API and the published skills.

    An assistant connected to Alya Books works with the same functions the app uses. Every page you can open has a read tool with the same filters, every write goes through a preview and a token (Preview, confirm and undo), and the skills tell the assistant the order of steps for a workflow. Lists return at most 100 rows per page.

    Read tools

    What you look atToolFilters
    Profit and loss, balance sheet, cash flow, equityget_financial_statementkey, from, to, periods, granularity, compare, dimension
    Report library (ageing, VAT by box, …)run_report, list_report_definitionsfrom, to, asOf, account, contact, dimension
    Trial balance, general ledger, account registerget_trial_balance, get_general_ledger, get_account_registerfrom, to, dimension
    Ledger lines across accounts, one account's balancelist_ledger_lines, get_account_balanceaccount, contact, journal, dimension, dates, state, q
    Journals, entries, chart of accounts, dimensions, fiscal yearslist_journals, list_journal_entries, get_journal_entry, list_accounts, list_dimensions, list_fiscal_yearsstate, journal, dates, keyword, type
    Is a date open?get_period_lock_statedate, journal, module
    Bank lines and the triage queuelist_bank_transactions, list_bank_triagestatus, account, contact, dates, view, q
    Schedules, fixed assets, loans, budgetslist_schedules, list_fixed_assets, list_loans, list_budgets, get_budget_vs_actualmodule, status, class, fiscal year
    Documentslist_documents, get_document_file, download_documentfolder, source, linked record, shared, dates, sort
    Close periods, tasks, proposed changes, findingslist_close_periods, list_close_tasks, list_period_change_proposals, list_close_findingsstatus, group, owner, q
    VAT returns, corporate tax computationslist_vat_returns, list_ct_computations, get_ct_computationstatus, dates, fiscal year
    Approvals, audit log, change batches, sync statelist_approvals, list_audit_events, list_change_batches, get_sync_statestatus, subject, requester, dates, q

    Write tools

    • Customers and items: create_customer, update_customer, create_product, update_product. Updates are patches: only the fields sent change. Pass version (the record's updatedAt) so a change someone else made in between is refused with version_conflict instead of overwritten; REST clients send the same value as If-Match.
    • Bills: create_bill, get_bill, update_bill. A bill's header, lines, service periods and dimensions change while it is a draft or under review; once accepted or booked only due date, notes, references and custom fields change (bill_posted): void it with a reason and record it again.
    • Journals: create_journal_entry, update_journal_entry (drafts only), post_journal_entry, reverse_journal_entry.
    • Bank: update_categorisation and update_bank_transaction change the memo, the proposal fields and the splits of a line; the amount and date of a bank-synced line never change (bank_line_immutable). categorise_bank_transaction, match_bank_transaction and post_bank_proposals post.
    • Documents: upload_document, link_document, set_document_shared (visible to the client in the portal).
    • A whole book from a file: start_ledger_import reads a file from the document hub (a Tally XML export, a CSV or a JSON file) and previews it without posting; confirm_ledger_import (asks) hands it to the scheduler, which posts it as one batch within a minute; get_ledger_import follows the progress; cancel_ledger_import (asks) stops it, keeping what posted. No row travels in a tool call; import_journal_entries with rows stays for a short file.
    • A write dated in a locked period becomes a proposed change for an approver (status: proposed); the assistant tells you who can approve it on the close checklist.

    The file API

    GET /documents/files pages (page, perPage), sorts (sort = date, name, size, linked; order) and filters (folderPath, source, linkedEntityType with the aliases client for a contact and work_item for a close task, linkedEntityId, shared, q, from, to). POST /documents/files uploads a file and can link it to a client or a work item; PATCH /documents/files/{id} sets shared; GET /documents/files/{id}/download answers a signed link that lasts 15 minutes, as invoice PDFs do.

    Skills

    A skill is a short Markdown file (SKILL.md) that teaches an assistant a workflow: which tools to call in which order, what to confirm with you, where to stop. Alya Books publishes six: alya-bookkeeping (invoices, bills, payments), alya-bank-review (triage, confirm, post, undo), alya-month-end-close (the checklist, proposed changes, sign-off, lock), alya-vat-return (diagnostics to Record EmaraTax submission), alya-corporate-tax (mapping to computation) and alya-migration (imports). Each names the tools it uses and the API version it was written for.

    • In the assistant: ask it to call list_skills, then load_skill with the name; or read the resource skills://<name>.
    • For a coding agent or a repository: npx skills add <repository> installs the files.
    • Setup → API access → API keys, card Agent skills, lists the skills with their version; GET /skills and GET /skills/{name} serve them.

    Good to know

    • The tool list an assistant sees depends on its scopes, tiers and your role (MCP scopes, tiers and tool permissions).
    • A chart import that meets an account type it does not know reports the account by code and name (unknown_account_type) instead of dropping the row; a journal import names the row of every error.
    • Requests pin an API version with X-Api-Version; a skill's version is the version it was written for.

    Still stuck? Contact support