biterp

list_invoices

Referência da tool list_invoices do MCP Server do bitERP (Notas fiscais de saída).

List Invoices · Notas fiscais de saída

Somente leituraDestrutivaIdempotenteMundo aberto
SimNãoSimNã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 fiscal invoice records for one organization with optional filters and cursor-based pagination.

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.
searchstringNãoOptional search on reference code, customer name, notes, or the record code (NTF-1042 for Brazilian companies; prefix depends on the tenant country; older INVO-1042 still matches).
operation_typestringNãoFilter by operation type: sale or return. Valores: sale, return.
product_typestringNãoFilter by product type: goods, service, or mixed. Valores: goods, service, mixed.
statusstringNãoFilter by invoice lifecycle status. Valores: draft, finalized, cancelled.
originstringNãoFilter by record provenance: 'internal' for invoices issued by bitERP, 'imported' for invoices brought in from an external NFS-e XML. Unrelated to origin_state_code, which is the geographic origin of the operation. Valores: internal, imported.
customer_idstring (UUID)NãoFilter by customer UUID.
sales_order_idstring (UUID)NãoFilter by originating sales order UUID.
include_detailsbooleanNãoWhen true, include items, taxes, customer, and country extension data per row. Defaults to false.
cursorstringNãoOpaque cursor for pagination. Omit on first call, then use next_cursor from the previous response.
limitintegerNãoItems 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).

CampoTipoDescrição
dataarray de objetos—
data[].idstring (UUID)—
data[].tenant_idstring (UUID)—
data[].record_numberintegerTenant-scoped sequential invoice number shown in the UI as NTF-1042 for Brazilian companies (prefix depends on the tenant country); pass 1042 without the prefix.
data[].reference_codestring ou null—
data[].statusstring—
data[].operation_typestring—
data[].product_typestring—
data[].originstringProcedência do registro: internal (nasceu no bitERP) ou imported. Valores: internal, imported.
data[].has_source_xmlbooleanTrue quando a nota tem arquivo XML de origem preservado no storage (import).
data[].source_data_import_idstring (UUID) ou null—
data[].import_cancellation_sourcestring ou nullNota importada cancelada: manual = registrado só no bitERP, não transmitido à prefeitura; demais valores = cancelamento veio no XML importado. Valores: abrasf_nfse_cancelamento, abrasf_nfse_substituicao, nacional_event_101101, nacional_event_105102, nacional_event_105104, nacional_event_305101, spreadsheet, manual.
data[].import_channelstring ou nullNota importada: file = XML enviado pelo usuário, spreadsheet = planilha, dfe_adn = captura da NFS-e emitida no Ambiente Nacional. Valores: file, spreadsheet, dfe_adn.
data[].br_dataobject—
data[].customer_idstring (UUID)—
data[].customerobject ou null—
data[].invoice_datestring (date)—
data[].origin_state_codestring ou null—
data[].origin_country_codestring ou null—
data[].destination_state_codestring ou null—
data[].destination_country_codestring ou null—
data[].customer_tax_typestring ou nullValores: individual, company.
data[].salesperson_namestring ou null—
data[].fiscal_notesstring ou null—
data[].internal_notesstring ou null—
data[].discount_amountstring—
data[].discount_ratestring—
data[].tax_engine_providerstring ou null—
data[].sales_order_idstring (UUID) ou null—
data[].subtotalstring—
data[].items_discountstring—
data[].total_discountstring—
data[].total_taxstring—
data[].withheld_totalstring—
data[].net_receivable_totalstring—
data[].totalstring—
data[].deleted_by_user_idstring (UUID) ou null—
data[].created_atstring (date-time)—
data[].updated_atstring (date-time)—
data[].deleted_atstring (date-time) ou null—
has_next_pageboolean—
has_previous_pageboolean—
next_cursorstring ou null—
previous_cursorstring 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_invoices",
        "arguments": {
            "tenant": "minha-empresa"
        }
    }
}

Nesta página