get_credit_card_statement_reconciliation
Referência da tool get_credit_card_statement_reconciliation do MCP Server do bitERP (Conciliação da fatura de cartão).
Get Credit Card Statement Reconciliation · Conciliação da fatura 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.
Returns the reconciliation of one credit card statement: the statement value in bitERP (biterp_total) next to what the bank charged (summary.bank_total), the counts per situation, and the statement lines filtered by situation with cursor-based pagination. A pending line is a bank debit without a card purchase; card_match says whether a purchase recorded by hand matches it (exact = Confere, amount_mismatch = Valor diferente, ambiguous = Vários, none = Sem compra). A line recorded by hand with its purchase counts as reconciled even before the bank line arrives (summary.manual_reconciled_count), so a difference between biterp_total and bank_total comes from pending lines or from those manual lines. bank_source none = the card has no bank data to reconcile. A future statement has no lines and is refused. Read only.
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). |
statement_id | string (UUID) | Sim | The statement ID (statement_id from get_credit_card_open_statement or list_credit_card_statements) |
status | string | Não | Lines to return: pending (default), reconciled, ignored, or all (every line that is not ignored) Valores: all, pending, reconciled, ignored. |
origin | string | Não | manual = only the lines recorded by hand in bitERP with a card purchase (combine with status=reconciled to list them) Valores: manual. |
cursor | string | Não | Cursor for pagination. Use next_cursor from the previous response. |
limit | integer | Não | Max lines 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 |
|---|---|---|
card_account_id | string (UUID) | — |
statement | object | — |
statement.statement_id | string (UUID) | — |
statement.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) |
statement.phase | string | Valores: open, future, in_correction, closed. |
statement.period_start | string (date) | — |
statement.period_end | string (date) | — |
statement.closes_on | string (date) | — |
statement.due_date | string (date) | — |
statement.biterp_total | string ou null | The statement value in bitERP: the forming total while open or in correction, the statement amount once closed; null when unknown |
statement.awaiting_close | boolean | — |
bank_source | string | Where the bank data of the card comes from: connection, ofx, import (PDF) or none (no bank data: nothing to reconcile) Valores: connection, ofx, import, none. |
summary | object | — |
summary.transaction_count | integer | Lines of the statement that are not ignored |
summary.reconciled_count | integer | — |
summary.pending_count | integer | Confere + Valor diferente + Vários + Sem compra |
summary.ignored_count | integer | — |
summary.pending_amount | string | — |
summary.reconciled_amount | string | — |
summary.exact_match_count | integer | Pending lines with one manual purchase that matches (Confere) |
summary.manual_reconciled_count | integer | Reconciled lines recorded by hand in bitERP: they count as reconciled even without a bank line (list them with origin=manual) |
summary.bank_line_count | integer | Lines that came from bank data (OFX, bank connection or PDF import), not ignored |
summary.bank_reconciled_count | integer | — |
summary.bank_total | string | What the bank charged in the statement (minus the sum of the bank lines, positive = debt): compare it with biterp_total |
summary.bank_last_posted_on | string (date) ou null | Day of the last bank line of the statement |
status | string | Situation filter applied to lines Valores: all, pending, reconciled, ignored. |
lines | array de objetos | — |
lines[].id | string (UUID) | The card line: pass it as transaction_id to reconcile_credit_card_line or create_credit_card_purchase_from_line |
lines[].posted_on | string (date) | — |
lines[].amount | string | Negative = debit (purchase, fee), positive = credit |
lines[].name | string ou null | — |
lines[].source | string | manual, ofx, integration (bank connection) or another origin |
lines[].transfer_id | string (UUID) ou null | Set on a transfer leg (statement payment or advance payment) |
lines[].card_purchase | object ou null | The card purchase this line belongs to; null when the line has no purchase |
lines[].card_installment | object ou null | Installment the bank connection says the line is; null otherwise |
lines[].card_refund | object ou null | The purchase this credit line refunds; null when unlinked |
lines[].card_match | object ou null | Only on pending bank lines: the manual card purchase that may be the same purchase. Null otherwise |
lines[].ignored_at | string (date-time) ou null | — |
lines[].ignored_by_name | string ou null | — |
has_next_page | boolean | — |
next_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": "get_credit_card_statement_reconciliation",
"arguments": {
"tenant": "minha-empresa",
"card_account_id": "<uuid>",
"statement_id": "<uuid>"
}
}
}
