biterp

list_credit_card_statements

Referência da tool list_credit_card_statements do MCP Server do bitERP (Faturas de cartão).

List Credit Card Statements · Faturas de cartão

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.

Lists the statements of one credit card, most recent first, with cursor-based pagination. phase: open = the statement being formed; future = a later cycle already opened by an installment; in_correction = reopened and waiting to close again; closed = closed (a closed statement with status cancelled had nothing to pay: credit cycle). amount and remaining_amount are null until the statement closes: the total in formation comes from get_credit_card_open_statement. A statement takes the purchases from period_start to period_end; it closes on closes_on (period_end + 1 day), and a purchase made on the closing day already goes to the next statement. Never add a statement total to the card account balance: they are the same debt on two axes. Read only: closing, paying or reopening a statement is done in the bitERP web app.

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.
card_account_idstring (UUID)SimThe credit card account ID. Find it with list_financial_accounts (type credit_card).
cursorstringNãoCursor for pagination. Use next_cursor from the previous response.
limitintegerNãoMax results per page (default 10, max 100)

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
dataarray de objetos—
data[].statement_idstring (UUID)—
data[].record_numberintegerTenant-scoped sequential number of the statement payable, shown in bitERP as CPG-<n> for Brazilian companies (prefix depends on the tenant country)
data[].phasestringopen = being formed; future = a later cycle already opened by an installment; in_correction = reopened, waiting to close again; closed = closed (status cancelled = credit cycle, nothing to pay) Valores: open, future, in_correction, closed.
data[].statusstringValores: pending, partial, paid, overdue, cancelled.
data[].period_startstring (date)—
data[].period_endstring (date)Last day whose purchases go to this statement: the eve of the closing day
data[].closes_onstring (date)Planned closing day (period_end + 1 day)
data[].closing_datestring (date) ou nullEffective cut-off day of a closed statement: the last day it took
data[].due_datestring (date)—
data[].amountstring ou nullStatement amount; null until the statement closes (use get_credit_card_open_statement for the total in formation)
data[].remaining_amountstring ou nullWhat is still unpaid on the statement; null until the statement closes
data[].minimum_payment_amountstring ou null—
data[].is_enteredbooleanPast period entered by the user and recorded closed with its lines (DEV-1192). It is a regular closed statement: when unpaid it is still due
has_next_pageboolean—
has_previous_pageboolean—
next_cursorstring ou null—
previous_cursorstring ou null—

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": "list_credit_card_statements",
        "arguments": {
            "tenant": "minha-empresa",
            "card_account_id": "<uuid>"
        }
    }
}

Nesta página