create_receivable
Referência da tool create_receivable do MCP Server do bitERP (Contas a receber).
Create Receivable · Contas a receber
| 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 one internal accounts receivable ledger record in the ERP.
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. |
customer_id | string (UUID) | Sim | Customer ID (must be an existing customer) |
financial_account_id | string (UUID) | Sim | Financial account ID for receiving (must be active) |
financial_category_id | string (UUID) | Não | Financial category ID (leaf, unblocked category) |
reference_code | string | Não | Unique reference code (e.g., REC-000042) |
amount | decimal (string ou number) | Sim | Receivable 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_date | string | Sim | Issue date as calendar date YYYY-MM-DD (e.g., "2026-03-01") |
due_date | string | Sim | Due date as calendar date YYYY-MM-DD (e.g., "2026-04-01") |
payment_method_id | string (UUID) | Não | Payment method ID |
discount_amount | decimal (string ou number) | Não | Discount amount for early payment as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted |
surcharge_amount | decimal (string ou number) | Não | Surcharge/interest amount for late payment as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted |
sales_order_id | string (UUID) | Não | Linked sales order ID |
description | string | Não | Public description |
notes | string | Não | Internal notes |
auto_generate_transaction | boolean | Não | Auto-generate financial transaction for manual accounts (cash/digital_wallet) |
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 |
|---|---|---|
id | string (UUID) | — |
tenant_id | string (UUID) | — |
record_number | integer | — |
customer_id | string (UUID) ou null | — |
customer | object ou null | — |
customer.id | string (UUID) | — |
customer.legal_name | string | — |
customer.trade_name | string ou null | — |
customer.tax_id | string ou null | — |
customer.tax_id_type | string ou null | — |
customer.country_code | string | — |
financial_account_id | string (UUID) | — |
financial_account | object ou null | — |
financial_account.id | string (UUID) | — |
financial_account.name | string | — |
financial_account.reference_code | string ou null | — |
financial_account.type | string | Valores: checking, savings, cash, digital_wallet, gateway, credit_card. |
payment_method_id | string (UUID) ou null | — |
payment_method | object ou null | — |
payment_method.id | string (UUID) | — |
payment_method.code | string | — |
payment_method.titles | object | — |
financial_category_id | string (UUID) ou null | — |
financial_category | object ou null | — |
financial_category.id | string (UUID) | — |
financial_category.name | string | — |
financial_category.code | string ou null | — |
account_scope_mask | object | — |
account_scope_mask.counterparty | boolean | — |
account_scope_mask.category | boolean | — |
account_scope_mask.balance | boolean | — |
reference_code | string ou null | — |
status | string | Valores: pending, partial, paid, overdue, cancelled. |
amount | string | — |
discount_amount | string | — |
surcharge_amount | string | — |
issue_date | string (date) | — |
due_date | string (date) | — |
paid_at | string (date-time) ou null | — |
installment_group_id | string (UUID) ou null | — |
installment_number | integer ou null | — |
installment_count | integer ou null | — |
description | string ou null | — |
notes | string ou null | — |
metadata | object | — |
created_by_user_id | string (UUID) ou null | — |
updated_by_user_id | string (UUID) ou null | — |
deleted_by_user_id | string (UUID) ou null | — |
created_at | string (date-time) | — |
updated_at | string (date-time) | — |
deleted_at | string (date-time) ou null | — |
sales_order_id | string (UUID) ou null | — |
sales_order | object ou null | — |
sales_order.id | string (UUID) | — |
sales_order.reference_code | string ou null | — |
sales_order.record_number | integer | — |
sales_order.status | string | Valores: draft, confirmed, cancelled. |
invoice_id | string (UUID) ou null | — |
invoice | object ou null | — |
invoice.id | string (UUID) | — |
invoice.reference_code | string ou null | — |
invoice.record_number | integer | — |
invoice.status | string | Valores: draft, finalized, cancelled. |
invoice.invoice_date | string (date) | — |
parent_receivable_id | string (UUID) ou null | — |
parent | any ou null | — |
type | string | Valores: standard, interest, fine. |
_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_receivable",
"arguments": {
"tenant": "minha-empresa",
"customer_id": "<uuid>",
"financial_account_id": "<uuid>",
"amount": "100.00",
"issue_date": "2026-01-15",
"due_date": "2026-01-15"
}
}
}
