offset_customer_credit_note
Referência da tool offset_customer_credit_note do MCP Server do bitERP (Notas de crédito do cliente).
Offset Customer Credit Note · Notas de crédito do cliente
| Somente leitura | Destrutiva | Idempotente | Mundo aberto |
|---|---|---|---|
| Não | Sim | Não | 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.
Applies a customer credit note to a receivable of the same customer. A customer credit note is a financial credit the tenant owes the customer. It is not a fiscal invoice (nota fiscal) and it does not move money. A date in a closed month is rejected. Requires permission to update both the credit note and the receivable.
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. |
id | string (UUID) | Sim | Customer credit note ID |
receivable_id | string (UUID) | Sim | Receivable of the same customer |
amount | decimal (string ou number) | Sim | Amount to offset as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted, must be > 0 and within both balances |
offset_date | string (date) | Sim | Settlement date of the offset (YYYY-MM-DD). Not in a closed month. |
notes | string | Não | Note about this offset |
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 |
|---|---|---|
offset | object | — |
offset.id | string (UUID) | — |
offset.customer_credit_note_id | string (UUID) | — |
offset.receivable_id | string (UUID) | — |
offset.amount | string | — |
offset.offset_date | string (date) | — |
offset.reverses_offset_id | string (UUID) ou null | — |
offset.reason | string ou null | — |
offset.notes | string ou null | — |
offset.created_at | string (date-time) | — |
note | object | — |
note.id | string (UUID) | — |
note.status | string | Valores: open, partial, used, cancelled. |
note.balance | string | — |
note.cancelled_amount | string | — |
receivable | object | — |
receivable.id | string (UUID) | — |
receivable.status | string | Valores: pending, partial, paid, overdue, cancelled. |
receivable.remaining_amount | string | — |
receivable.paid_at | string (date-time) ou null | — |
_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": "offset_customer_credit_note",
"arguments": {
"tenant": "minha-empresa",
"id": "<uuid>",
"receivable_id": "<uuid>",
"amount": "100.00",
"offset_date": "2026-01-15"
}
}
}
