biterp

allocate_receivable_transaction

Referência da tool allocate_receivable_transaction do MCP Server do bitERP (Contas a receber).

Allocate Transaction to Receivable · Contas a receber

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

Allocates an existing ERP financial transaction entry to one receivable record for internal reconciliation. When the allocated amount exceeds the title balance, the surplus MUST be explained through difference_components (interest or fine charged to the customer, or contractual surcharge) — money that moved through the bank always belongs to some title. Amounts below the balance are a partial receipt and need no components.

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.
receivable_idstring (UUID)SimThe receivable ID to allocate the transaction to
financial_transaction_idstring (UUID)SimThe financial transaction ID to allocate
allocated_amountdecimal (string ou number)SimAmount to allocate from this transaction as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted
notesstringNãoNotes about this allocation
difference_componentsarray de objetosNãoComponents that make up the difference between the allocated amount and the title balance. Required when the allocated amount exceeds the balance; must add up to that difference. Omit for an exact match or a partial payment.
difference_components[].typestringSimBusiness nature of this slice of the difference. interest/fine/bank_fee create a charge title; surcharge/discount adjust the origin title balance; partial is the residue left open. Valores: interest, fine, bank_fee, surcharge, discount, partial.
difference_components[].amountdecimal (string ou number)SimAbsolute magnitude of this component as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted, always positive
difference_components[].financial_category_idstring (UUID)NãoFinancial category for the charge title. Required for interest/fine/bank_fee; rejected for the other types.
difference_components[].counterparty_idstring (UUID)NãoCounterparty for the charge title. Required for bank_fee (the bank as a supplier); rejected for every other type.

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)—
tenant_idstring (UUID)—
receivable_idstring (UUID)—
financial_transaction_idstring (UUID)—
allocated_amountstring—
reverses_allocation_idstring (UUID) ou null—
discount_deltastring—
surcharge_deltastring—
notesstring ou null—
created_by_user_idstring (UUID) ou null—
updated_by_user_idstring (UUID) ou null—
deleted_by_user_idstring (UUID) ou null—
created_atstring (date-time)—
updated_atstring (date-time)—
deleted_atstring (date-time) ou null—
_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": "allocate_receivable_transaction",
        "arguments": {
            "tenant": "minha-empresa",
            "receivable_id": "<uuid>",
            "financial_transaction_id": "<uuid>",
            "allocated_amount": "100.00"
        }
    }
}

Nesta página