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 leitura | Destrutiva | Idempotente | Mundo aberto |
|---|---|---|---|
| Sim | Não | Sim | Nã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âmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
tenant | string | Sim | Defines 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. |
mode | string | Sim | realized=posted cash movements; projected=open receivables/payables by due date Valores: realized, projected. |
period | string | Sim | this_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. |
range | object | Não | Required when period=custom (ISO dates) |
range.start | string | Sim | — |
range.end | string | Sim | — |
granularity | string | Sim | week | month Valores: week, month. |
financial_account_id | string (UUID) | Não | Optional 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_residual | boolean | Não | Only 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).
| Campo | Tipo | Descrição |
|---|---|---|
rows | array de objetos | — |
rows[].period_label | string | — |
rows[].period_start | string | — |
rows[].period_end | string | — |
rows[].inflows | string | — |
rows[].outflows | string | — |
rows[].net | string | — |
rows[].accumulated_balance | string | — |
meta | object | — |
meta.mode | string | Valores: realized, projected. |
meta.currency | string | — |
meta.period | object | — |
meta.granularity | string | Valores: week, month. |
meta.opening_balance | string | — |
meta.opening_balance_at | string | — |
meta.percentage | string | — |
meta.note | string | — |
meta.budget_residual_included | boolean | — |
meta.budget_residual_total | object | — |
meta.budget_residual_by_period | array de objetos | — |
meta.withheld_count | integer | — |
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"
}
}
}
