create_payable_installments
Referência da tool create_payable_installments do MCP Server do bitERP (Contas a pagar).
Create Payable Installments · Contas a pagar
| Somente leitura | Destrutiva | Idempotente | Mundo aberto |
|---|---|---|---|
| Não | Não | 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.
Creates multiple internal accounts payable records by splitting one total amount into installments. Credit card accounts are not accepted; record card purchases in bitERP.
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. |
supplier_id | string (UUID) | Sim | Supplier ID |
financial_account_id | string (UUID) | Sim | Financial account ID (must be active). Credit card accounts are not accepted: card purchases go through the credit card routine. To record a card expense as a regular payable, use a checking, savings or cash account with the credit_card payment method. |
reference_code_prefix | string | Não | Optional custom prefix for installment codes (e.g. INV-2026/1). When omitted, installments persist with NULL reference_code. |
total_amount | decimal (string ou number) | Sim | Total amount to split into installments as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted, must be > 0 |
installment_count | integer | Sim | Number of installments (2-120) |
issue_date | string | Sim | Issue date for all installments as calendar date YYYY-MM-DD |
first_due_date | string | Sim | First due date as calendar date YYYY-MM-DD. Subsequent are monthly. |
payment_method_id | string (UUID) | Não | Payment method ID |
description | string | Não | Description for all installments |
notes | string | Não | Notes for all installments |
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 |
|---|---|---|
data | array de objetos | — |
data[].id | string (UUID) | — |
data[].tenant_id | string (UUID) | — |
data[].record_number | integer | — |
data[].supplier_id | string (UUID) ou null | — |
data[].supplier | object ou null | — |
data[].financial_account_id | string (UUID) | — |
data[].financial_account | object ou null | — |
data[].payment_method_id | string (UUID) ou null | — |
data[].payment_method | object ou null | — |
data[].financial_category_id | string (UUID) ou null | — |
data[].financial_category | object ou null | — |
data[].account_scope_mask | object | — |
data[].purchase_invoice_id | string (UUID) ou null | — |
data[].purchase_invoice | object ou null | — |
data[].parent_payable_id | string (UUID) ou null | — |
data[].parent | any ou null | — |
data[].statement_payable_id | string (UUID) ou null | — |
data[].type | string | Valores: standard, interest, fine, bank_fee, refund, chargeback, card_statement. |
data[].reference_code | string ou null | — |
data[].status | string | Valores: pending, partial, paid, overdue, cancelled. |
data[].amount | string | — |
data[].discount_amount | string | — |
data[].surcharge_amount | string | — |
data[].issue_date | string (date) | — |
data[].due_date | string (date) | — |
data[].paid_at | string (date-time) ou null | — |
data[].installment_group_id | string (UUID) ou null | — |
data[].installment_number | integer ou null | — |
data[].installment_count | integer ou null | — |
data[].description | string ou null | — |
data[].notes | string ou null | — |
data[].metadata | object | — |
data[].created_by_user_id | string (UUID) ou null | — |
data[].updated_by_user_id | string (UUID) ou null | — |
data[].deleted_by_user_id | string (UUID) ou null | — |
data[].created_at | string (date-time) | — |
data[].updated_at | string (date-time) | — |
data[].deleted_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": "create_payable_installments",
"arguments": {
"tenant": "minha-empresa",
"supplier_id": "<uuid>",
"financial_account_id": "<uuid>",
"total_amount": "100.00",
"installment_count": 2,
"issue_date": "2026-01-15",
"first_due_date": "2026-01-15"
}
}
}
