reconcile_credit_card_line
Referência da tool reconcile_credit_card_line do MCP Server do bitERP (Conciliação da fatura de cartão).
Reconcile Credit Card Line · Conciliação da fatura de cartão
| Somente leitura | Destrutiva | Idempotente | Mundo aberto |
|---|---|---|---|
| Não | Sim | 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.
Reconciles a pending bank line of a credit card with the purchase recorded by hand for the same expense: the bank line takes over the purchase, and the manual line is replaced (ignored and deleted), keeping supplier, category and statement. Use the pair from card_match of get_credit_card_statement_reconciliation. When the amounts differ (amount_mismatch), pass accept_bank_amount=true after the user confirms: the purchase takes the bank amount. Never reconcile on your own: propose it and wait for the user to approve. Only lines of the open statement can change: a closed statement neither receives nor loses anything, and the tool refuses its lines.
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. |
transaction_id | string (UUID) | Sim | The bank line of the card (lines[].id of get_credit_card_statement_reconciliation) |
manual_transaction_id | string (UUID) | Sim | The manual card line it replaces (card_match.top_candidate.transaction_id of get_credit_card_statement_reconciliation) |
accept_bank_amount | boolean | Não | Required when the amounts differ (card_match.state amount_mismatch): the card purchase takes the bank amount. Without it, a different amount is refused. |
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 |
|---|---|---|
bank_transaction_id | string (UUID) | The bank line, now linked to the card purchase |
replaced_transaction_id | string (UUID) | The manual line, ignored and deleted by the replacement |
payable_id | string (UUID) | The card purchase, kept |
amount_updated | boolean | The card purchase amount changed to the bank amount (accept_bank_amount) |
_tenant | object | — |
_tenant.id | string (UUID) | — |
_tenant.slug | string | — |
_tenant.company_name | string | — |
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": "reconcile_credit_card_line",
"arguments": {
"tenant": "minha-empresa",
"transaction_id": "<uuid>",
"manual_transaction_id": "<uuid>"
}
}
}
