biterp
MCP ServerReferência de toolsFluxo de caixa

cash_flow_statement

Referência da tool cash_flow_statement do MCP Server do bitERP (Fluxo de caixa).

Cash Flow Statement · Fluxo de caixa

Somente leituraDestrutivaIdempotenteMundo aberto
SimNãoSimNão

Descrição

A descrição abaixo é a que o servidor publica, em inglês, e é o texto que o agente lê para decidir quando usar a tool.

Multi-column cash flow statement by period: inflows, outflows, net and accumulated balance. Use mode=realized for posted movements or mode=projected for open receivables/payables by due date. Without financial_account_id the statement is strict cash: liability accounts (credit cards) are out of the opening balance and of the flows, a card statement payment counts as an outflow, and card spending shows up only when the statement is paid (projected: by its due date). With financial_account_id: realized reports that account's own movements, transfers included; projected reports that account's balance and open titles, card purchases included through the statement's account, and rejects a credit card account (use realized for it). Projected without account accepts include_budget_residual to add the budget not yet launched as titles. Open customer credit note balance is not projected; when positive, meta.note reports the current open balance of notes issued on or before period end. Accounts whose balance the user may not see are out of the opening balance and posted flows (meta.withheld_count; open titles still count in projected) and refused as financial_account_id.

Parâmetros

ParâmetroTipoObrigatórioDescrição
tenantstringSimDefines which tenant will have data read or changed. Use list_tenants first and prefer the returned tenant slug. Writes are permanent, so when the user has more than one tenant you must confirm the tenant before any write and never assume or reuse a previous choice without confirmation. UUID is accepted only when already known safely.
modestringSimrealized=posted cash movements; projected=open receivables/payables by due date Valores: realized, projected.
periodstringSimthis_week | last_week | last_7_days | this_month | last_month | last_30_days | last_3_months | this_year | custom. all_time/today/yesterday are not supported — use custom within the window limits Valores: this_week, last_week, last_7_days, this_month, last_month, last_30_days, last_3_months, this_year, custom.
rangeobjectNãoRequired when period=custom (ISO dates)
range.startstringSim—
range.endstringSim—
granularitystringSimweek | month Valores: week, month.
financial_account_idstring (UUID)NãoOptional filter by financial account. Without it the statement is strict cash (asset accounts only). With it, mode=realized reports that account's own movements, transfers included; mode=projected reports that account's balance and its open receivables/payables, with card purchases counted in the account that pays the statement. Liability (credit card) accounts are rejected in mode=projected.
include_budget_residualbooleanNãoOnly with mode=projected and without financial_account_id. Adds the budget not yet turned into titles: per budgeted category and month, max(0, budget - titles due in that month, paid ones included), on the budget due_day (month end without it). Default false. Turn it on only when the user asks for the projection with the budget, and say in the answer that the numbers include the budget residual (meta.budget_residual_total). Requires financial-budgets:read.

Resposta

O structuredContent da resposta traz os campos abaixo (até dois níveis; o schema completo está no outputSchema publicado no tools/list).

CampoTipoDescrição
rowsarray de objetos—
rows[].period_labelstring—
rows[].period_startstring—
rows[].period_endstring—
rows[].inflowsstring—
rows[].outflowsstring—
rows[].netstring—
rows[].accumulated_balancestring—
metaobject—
meta.modestringValores: realized, projected.
meta.currencystring—
meta.periodobject—
meta.granularitystringValores: week, month.
meta.opening_balancestring—
meta.opening_balance_atstring—
meta.percentagestring—
meta.notestring—
meta.budget_residual_includedboolean—
meta.budget_residual_totalobject—
meta.budget_residual_by_periodarray de objetos—
meta.withheld_countinteger—

Exemplo de chamada

Requisição tools/call com os parâmetros obrigatórios. Os valores são ilustrativos: troque minha-empresa pelo tenant devolvido por list_tenants e cada <...> por um valor real.

{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "cash_flow_statement",
        "arguments": {
            "tenant": "minha-empresa",
            "mode": "realized",
            "period": "this_week",
            "granularity": "week"
        }
    }
}

On this page