list_purchase_invoices
Referência da tool list_purchase_invoices do MCP Server do bitERP (Notas fiscais de entrada).
List Purchase Invoices · Notas fiscais de entrada
| Somente leitura | Destrutiva | Idempotente | Mundo aberto |
|---|---|---|---|
| Sim | Não | Sim | 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.
Lists purchase invoices (incoming supplier documents) with optional filters and cursor-based pagination.
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. |
search | string | Não | Optional search on reference code, supplier name, or invoice number. |
status | string | Não | Filter by purchase invoice status. Valores: draft, finalized. |
supplier_id | string (UUID) | Não | Filter by supplier UUID. |
product_type | string | Não | Filter by product type. Valores: goods, service, mixed. |
document_type | string | Não | Filter by document type (nfe, nfce, cfe, nfse, cte, receipt, other). Valores: nfe, nfce, cfe, nfse, cte, receipt, other. |
operation_type | string | Não | Filter by operation type code. |
invoice_number | string | Não | Filter by supplier invoice number. |
cursor | string | Não | Opaque cursor for pagination. Omit on first call, then use next_cursor from the previous response. |
limit | integer | Não | Items per page (default: 10, max: 100). |
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[].supplier_id | string (UUID) | — |
data[].supplier | object ou null | — |
data[].reference_code | string ou null | — |
data[].invoice_number | string | — |
data[].invoice_series | string ou null | — |
data[].status | string | Valores: draft, finalized. |
data[].situation | string | Valores: draft, manual, imported, validated, rejected, booked, finalized. |
data[].operation_type | string | — |
data[].product_type | string | Valores: goods, service, mixed. |
data[].document_type | string | Valores: nfe, nfce, cfe, nfse, cte, receipt, other. |
data[].issue_date | string (date) | — |
data[].due_date | string (date) ou null | — |
data[].received_date | string (date) ou null | — |
data[].description | string ou null | — |
data[].notes | string ou null | — |
data[].discount_amount | string | — |
data[].discount_rate | string | — |
data[].subtotal | string | — |
data[].items_discount | string | — |
data[].total_discount | string | — |
data[].total_tax | string | — |
data[].withheld_total | string | — |
data[].net_payable_total | string | — |
data[].covered_amount | string | — |
data[].uncovered_amount | string | — |
data[].total | string | — |
data[].pending_payables | array de objetos ou null | — |
data[].br_data | object ou null | — |
data[].us_data | object 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 | — |
has_next_page | boolean | — |
has_previous_page | boolean | — |
next_cursor | string ou null | — |
previous_cursor | string ou null | — |
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": "list_purchase_invoices",
"arguments": {
"tenant": "minha-empresa"
}
}
}
