biterp

create_receivable_from_transaction

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

Create Receivable from Transaction · 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.

Creates one internal accounts receivable record from an ERP transaction entry and records the allocation in one operation.

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.
financial_transaction_idstring (UUID)SimFinancial transaction ID to create receivable from
customer_idstring (UUID)SimCustomer ID
reference_codestringSimUnique reference code
issue_datestringSimIssue date as calendar date YYYY-MM-DD
due_datestringSimDue date as calendar date YYYY-MM-DD
amountdecimal (string ou number)NãoReceivable amount as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted. If omitted, uses transaction amount.
allocated_amountdecimal (string ou number)NãoAmount to allocate as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted. If omitted, uses min(receivable, remaining on tx).
payment_method_idstring (UUID)NãoPayment method ID
financial_category_idstring (UUID)NãoFinancial category ID (leaf, unblocked category)
discount_amountdecimal (string ou number)NãoDiscount amount as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted
surcharge_amountdecimal (string ou number)NãoSurcharge amount as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted
sales_order_idstring (UUID)NãoLinked sales order ID
descriptionstringNãoDescription
notesstringNãoNotes

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
receivableobject—
receivable.idstring (UUID)—
receivable.tenant_idstring (UUID)—
receivable.record_numberinteger—
receivable.customer_idstring (UUID) ou null—
receivable.customerobject ou null—
receivable.financial_account_idstring (UUID)—
receivable.financial_accountobject ou null—
receivable.payment_method_idstring (UUID) ou null—
receivable.payment_methodobject ou null—
receivable.financial_category_idstring (UUID) ou null—
receivable.financial_categoryobject ou null—
receivable.account_scope_maskobject—
receivable.reference_codestring ou null—
receivable.statusstringValores: pending, partial, paid, overdue, cancelled.
receivable.amountstring—
receivable.discount_amountstring—
receivable.surcharge_amountstring—
receivable.issue_datestring (date)—
receivable.due_datestring (date)—
receivable.paid_atstring (date-time) ou null—
receivable.installment_group_idstring (UUID) ou null—
receivable.installment_numberinteger ou null—
receivable.installment_countinteger ou null—
receivable.descriptionstring ou null—
receivable.notesstring ou null—
receivable.metadataobject—
receivable.created_by_user_idstring (UUID) ou null—
receivable.updated_by_user_idstring (UUID) ou null—
receivable.deleted_by_user_idstring (UUID) ou null—
receivable.created_atstring (date-time)—
receivable.updated_atstring (date-time)—
receivable.deleted_atstring (date-time) ou null—
receivable.sales_order_idstring (UUID) ou null—
receivable.sales_orderobject ou null—
receivable.invoice_idstring (UUID) ou null—
receivable.invoiceobject ou null—
receivable.parent_receivable_idstring (UUID) ou null—
receivable.parentany ou null—
receivable.typestringValores: standard, interest, fine.
allocationobject—
allocation.idstring (UUID)—
allocation.tenant_idstring (UUID)—
allocation.receivable_idstring (UUID)—
allocation.financial_transaction_idstring (UUID)—
allocation.allocated_amountstring—
allocation.reverses_allocation_idstring (UUID) ou null—
allocation.discount_deltastring—
allocation.surcharge_deltastring—
allocation.notesstring ou null—
allocation.created_by_user_idstring (UUID) ou null—
allocation.updated_by_user_idstring (UUID) ou null—
allocation.deleted_by_user_idstring (UUID) ou null—
allocation.created_atstring (date-time)—
allocation.updated_atstring (date-time)—
allocation.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": "create_receivable_from_transaction",
        "arguments": {
            "tenant": "minha-empresa",
            "financial_transaction_id": "<uuid>",
            "customer_id": "<uuid>",
            "reference_code": "<reference_code>",
            "issue_date": "2026-01-15",
            "due_date": "2026-01-15"
        }
    }
}

Nesta página