biterp

delete_invoice

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

Delete Invoice · Notas fiscais de saída

Somente leituraDestrutivaIdempotenteMundo aberto
NãoSimSimSim

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.

Soft-deletes a fiscal invoice that was never authorized: a draft, a finalized invoice not yet transmitted, or one stuck in transmission_error. For transmission_error the NFS-e provider is checked first and the invoice is only deleted when the provider confirms it was not authorized; an authorized invoice must be cancelled (cancel_invoice) and a queued one must wait for the provider. Imported invoices (origin = imported) can be deleted in any state; this only removes them from bitERP, nothing is sent to the city hall and the invoice stays valid there. Undoing deletion is not available via MCP — users restore records in the bitERP web app.

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.
idstring (UUID)SimUUID of the invoice to soft-delete (draft, finalized not yet transmitted, with a transmission error, or imported in any state).

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
deletedboolean—
idstring (UUID)—
_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": "delete_invoice",
        "arguments": {
            "tenant": "minha-empresa",
            "id": "<uuid>"
        }
    }
}

Nesta página