biterp

create_customer_credit_note

Referência da tool create_customer_credit_note do MCP Server do bitERP (Notas de crédito do cliente).

Create Customer Credit Note · Notas de crédito do cliente

Somente leituraDestrutivaIdempotenteMundo aberto
NãoNãoNãoNã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.

Creates a customer credit note. 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. Offsetting it against a receivable is a separate call. The category must be a revenue deduction.

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.
customer_idstring (UUID)SimCustomer the tenant owes the credit to
amountdecimal (string ou number)SimCredit amount as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted, must be > 0
issue_datestring (date)SimDate the credit was granted (YYYY-MM-DD)
financial_category_idstring (UUID)SimFinancial category with presentation role 'revenue_deduction'
descriptionstringNãoShort description
reference_codestringNãoOrigin system reference code
source_invoice_idstring (UUID)NãoFiscal invoice the credit refers to. Must belong to the same customer. Not a fiscal credit note.
notesstringNãoInternal notes

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
idstring (UUID)—
record_numberinteger—
customer_idstring (UUID)—
customerobject ou null—
customer.idstring (UUID)—
customer.legal_namestring—
customer.trade_namestring ou null—
financial_category_idstring (UUID)—
source_invoice_idstring (UUID) ou null—
originstringValores: manual, overpayment, stripe_customer_balance.
statusstringValores: open, partial, used, cancelled.
amountstring—
cancelled_amountstring—
used_amountstring—
balancestring—
has_usageboolean—
issue_datestring (date)—
descriptionstring ou null—
reference_codestring ou null—
notesstring ou null—
cancelled_atstring (date-time) ou null—
cancellation_reasonstring ou null—
created_atstring (date-time)—
updated_atstring (date-time)—
_tenantobject—
_tenant.idstring (UUID)—
_tenant.slugstring—
_tenant.company_namestring—

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": "create_customer_credit_note",
        "arguments": {
            "tenant": "minha-empresa",
            "customer_id": "<uuid>",
            "amount": "100.00",
            "issue_date": "2026-01-15",
            "financial_category_id": "<uuid>"
        }
    }
}

Nesta página