biterp

create_payable_from_transaction

Referência da tool create_payable_from_transaction do MCP Server do bitERP (Contas a pagar).

Create Payable from Transaction · Contas a pagar

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 payable record from an ERP transaction entry and records the allocation in one operation. Not available for transactions on a credit card account.

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 payable from (typically a DEBIT transaction)
supplier_idstring (UUID)SimSupplier 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ãoPayable 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 absolute value of 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(payable, 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
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
payableobject—
payable.idstring (UUID)—
payable.tenant_idstring (UUID)—
payable.record_numberinteger—
payable.supplier_idstring (UUID) ou null—
payable.supplierobject ou null—
payable.financial_account_idstring (UUID)—
payable.financial_accountobject ou null—
payable.payment_method_idstring (UUID) ou null—
payable.payment_methodobject ou null—
payable.financial_category_idstring (UUID) ou null—
payable.financial_categoryobject ou null—
payable.account_scope_maskobject—
payable.purchase_invoice_idstring (UUID) ou null—
payable.purchase_invoiceobject ou null—
payable.parent_payable_idstring (UUID) ou null—
payable.parentany ou null—
payable.statement_payable_idstring (UUID) ou null—
payable.typestringValores: standard, interest, fine, bank_fee, refund, chargeback, card_statement.
payable.reference_codestring ou null—
payable.statusstringValores: pending, partial, paid, overdue, cancelled.
payable.amountstring—
payable.discount_amountstring—
payable.surcharge_amountstring—
payable.issue_datestring (date)—
payable.due_datestring (date)—
payable.paid_atstring (date-time) ou null—
payable.installment_group_idstring (UUID) ou null—
payable.installment_numberinteger ou null—
payable.installment_countinteger ou null—
payable.descriptionstring ou null—
payable.notesstring ou null—
payable.metadataobject—
payable.created_by_user_idstring (UUID) ou null—
payable.updated_by_user_idstring (UUID) ou null—
payable.deleted_by_user_idstring (UUID) ou null—
payable.created_atstring (date-time)—
payable.updated_atstring (date-time)—
payable.deleted_atstring (date-time) ou null—
allocationobject—
allocation.idstring (UUID)—
allocation.tenant_idstring (UUID)—
allocation.payable_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_payable_from_transaction",
        "arguments": {
            "tenant": "minha-empresa",
            "financial_transaction_id": "<uuid>",
            "supplier_id": "<uuid>",
            "reference_code": "<reference_code>",
            "issue_date": "2026-01-15",
            "due_date": "2026-01-15"
        }
    }
}

Nesta página