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 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.
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â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. |
card_account_id | string (UUID) | Sim | The credit card account ID. Find it with list_financial_accounts (type credit_card). |
cursor | string | Não | Cursor for pagination. Use next_cursor from the previous response. |
limit | integer | Não | Max 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).
| Campo | Tipo | Descrição |
|---|---|---|
data | array de objetos | — |
data[].statement_id | string (UUID) | — |
data[].record_number | integer | Tenant-scoped sequential number of the statement payable, shown in bitERP as CPG-<n> for Brazilian companies (prefix depends on the tenant country) |
data[].phase | string | open = 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[].status | string | Valores: pending, partial, paid, overdue, cancelled. |
data[].period_start | string (date) | — |
data[].period_end | string (date) | Last day whose purchases go to this statement: the eve of the closing day |
data[].closes_on | string (date) | Planned closing day (period_end + 1 day) |
data[].closing_date | string (date) ou null | Effective cut-off day of a closed statement: the last day it took |
data[].due_date | string (date) | — |
data[].amount | string ou null | Statement amount; null until the statement closes (use get_credit_card_open_statement for the total in formation) |
data[].remaining_amount | string ou null | What is still unpaid on the statement; null until the statement closes |
data[].minimum_payment_amount | string ou null | — |
data[].is_entered | boolean | Past 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_page | boolean | — |
has_previous_page | boolean | — |
next_cursor | string ou null | — |
previous_cursor | string 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>"
}
}
}
