SAGA C. (Romanian accounting)

v0.1.1
io.github.klove-app/saga-mcp Checked 1 day ago Published 1 day ago

SAGA C. accounting (Romania): balances, invoices, VAT, stock.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

saga_list_firms List SAGA firms

Lists the SAGA firm databases this server can open (code and database path).

saga_firm_info Firm overview

Overview of one firm: last closed period, VAT settings, ledger date range, record counts, Firebird version.

ParameterTypeDescription
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.

saga_list_accounts Chart of accounts

Accounts from the chart of accounts (planul de conturi), optionally filtered by prefix or by text in the name.

ParameterTypeDescription
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
limitintegerMaximum rows to return.
prefixstringe.g. "401" or "5121"
searchstring

saga_trial_balance Trial balance (balanta de verificare)

Trial balance for a period: opening balance at 1 January, previous turnover, period turnover, totals and closing balance per account. level: synthetic (default; e.g. 401), analytic (as stored, e.g. 401.00012) or group3 (first 3 digits).

ParameterTypeDescription
date_from *stringStart date, YYYY-MM-DD (inclusive).
date_to *stringEnd date, YYYY-MM-DD (inclusive).
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
include_zeroboolean
levelstring
prefixstringOnly accounts starting with this, e.g. "6" or "401".

saga_account_ledger Account ledger (fisa contului)

All entries of one account in a period with opening balance, running balance and closing balance. match=account (default) includes analytic sub-accounts ("401" -> 401, 401.x); match=prefix takes every account starting with the text.

ParameterTypeDescription
account *string
date_from *stringStart date, YYYY-MM-DD (inclusive).
date_to *stringEnd date, YYYY-MM-DD (inclusive).
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
limitintegerMaximum rows to return.
matchstring
offsetintegerRows to skip (for paging).

saga_journal General journal (registru jurnal)

Ledger entries (REGISTRU) in a period, filterable by source (FEL_D: Intrari, Iesiri, Casa, Banca, Inchidere, Salarii, ...), account, partner code, note id, document number or text.

ParameterTypeDescription
date_from *stringStart date, YYYY-MM-DD (inclusive).
date_to *stringEnd date, YYYY-MM-DD (inclusive).
accountstring
doc_nostring
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
limitintegerMaximum rows to return.
note_idinteger
offsetintegerRows to skip (for paging).
partner_codestring
sourcestring
textstring

saga_journal_sources Journal sources

Which kinds of ledger entries (FEL_D values) exist and their date ranges.

ParameterTypeDescription
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.

saga_partners Suppliers / customers

Search suppliers or customers by name or fiscal code. Personal numeric codes (CNP) are masked.

ParameterTypeDescription
kind *string
codestring
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
limitintegerMaximum rows to return.
searchstring

saga_open_invoices Open (unpaid) invoices

Unpaid supplier invoices (kind=suppliers) or customer invoices (kind=customers), with due dates and days overdue. Foreign-currency invoices are included with currency and unpaid_currency. as_of (YYYY-MM-DD) gives the situation at a past date.

ParameterTypeDescription
kind *string
as_ofstring
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
limitintegerMaximum rows to return.
only_overdueboolean
partner_codestring

saga_partner_balances Partner balances

Per supplier or customer: unpaid and overdue totals from open invoices, plus the general-ledger balance of the partner account for reconciliation.

ParameterTypeDescription
kind *string
as_ofstring
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
limitintegerMaximum rows to return.
partner_codestring

saga_documents Purchase / sales documents

Purchase (intrari) or sales (iesiri) documents in a period with totals. currency=true lists the foreign-currency ones instead (SAGA keeps them apart: purchases in INTRD, sales in EXPORT).

ParameterTypeDescription
date_from *stringStart date, YYYY-MM-DD (inclusive).
date_to *stringEnd date, YYYY-MM-DD (inclusive).
kind *string
currencybooleantrue = foreign-currency documents.
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
limitintegerMaximum rows to return.
numberstring
offsetintegerRows to skip (for paging).
only_unpostedboolean
partner_codestring

saga_document One document with lines

One purchase or sales document: header, lines, the ledger entries it produced and the payments linked to it.

ParameterTypeDescription
id *integerDocument id (ID_INTRARE / ID_IESIRE) from saga_documents or saga_open_invoices.
kind *string
currencybooleantrue = a foreign-currency document; when omitted, both kinds are searched.
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.

saga_stock Stock by warehouse

Stock quantities (and an estimated value at cost) per warehouse (gestiune) and article at a date.

ParameterTypeDescription
articlestring
as_ofstring
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
include_zeroboolean
limitintegerMaximum rows to return.
searchstring
warehousestring

saga_stock_movements Stock movements of an article

Movements of one article (optionally one warehouse) in a period with running quantity.

ParameterTypeDescription
article *string
date_from *stringStart date, YYYY-MM-DD (inclusive).
date_to *stringEnd date, YYYY-MM-DD (inclusive).
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
limitintegerMaximum rows to return.
warehousestring

saga_cash_bank_balances Cash and bank balances

Balances of all cash (531x) and bank (512x) accounts at a date.

ParameterTypeDescription
as_ofstring
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.

saga_cash_bank_register Cash / bank register

Register of one cash or bank account (e.g. 5311, 5121.1): opening balance, entries with running balance, closing balance.

ParameterTypeDescription
account *string
date_from *stringStart date, YYYY-MM-DD (inclusive).
date_to *stringEnd date, YYYY-MM-DD (inclusive).
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
limitintegerMaximum rows to return.
offsetintegerRows to skip (for paging).

saga_vat_summary VAT summary

VAT accounts turnover (4426, 4427, 4428, 4423, 4424) and sales/purchases net and VAT by rate for a period. Not a D300 return.

ParameterTypeDescription
date_from *stringStart date, YYYY-MM-DD (inclusive).
date_to *stringEnd date, YYYY-MM-DD (inclusive).
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.

saga_saft_check SAF-T (D406) readiness check

Basic checks before D406: accounts used but missing from the chart or SAF-T mapping, partners without fiscal codes, unposted documents.

ParameterTypeDescription
date_from *stringStart date, YYYY-MM-DD (inclusive).
date_to *stringEnd date, YYYY-MM-DD (inclusive).
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
limitintegerMaximum rows to return.

saga_list_tables List database tables

Tables in the SAGA database (about 195), optionally with row counts. Payroll tables are flagged.

ParameterTypeDescription
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
searchstring
with_countsboolean

saga_describe_table Describe a table

Columns (name, type, default) and primary key of one table. Shows structure only, no data.

ParameterTypeDescription
table *string
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.

saga_query Read-only SQL query

Runs one SELECT (Firebird 3 SQL dialect) inside a READ ONLY transaction. Use FIRST/ROWS for limits, ? for parameters. Text columns are padded with spaces; compare with = (trailing blanks ignored) or TRIM(). Payroll tables are blocked unless the server owner enabled them.

ParameterTypeDescription
sql *string
firmstringFirm code (folder name such as "0001"). Optional when only one firm is configured.
max_rowsinteger
paramsarray