Skip to main content
Glama

omie_get_invoice_xml

Read-onlyIdempotent

XML da NF-e emitida (ObterNfe, serviço dfedocs). Devolve o documento fiscal em si — o mesmo XML autorizado pela SEFAZ — além da chave de acesso, do PDF do DANFE e do status. É o caminho para AUDITAR a nota: pegue o XML aqui e mande em auditor_fiscal_auditar_nota. Identifique a nota por id_nfe. Ele vem do omie_get_invoice, no bloco compl como nIdNF (a Omie escreve o mesmo id com dois nomes: nIdNF na resposta, nIdNfe no pedido). ATENÇÃO: só funciona para notas que VOCÊ emitiu. A SEFAZ não devolve ao emitente o XML da própria nota, então o ERP que emitiu é a única origem possível.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_nfeYes
accountNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds significant behavioral detail: it returns the exact PDF document authorized by SEFAZ (not a proxy or summary) or representation, the specific return components, the only-for-self-issued restriction, and the nIdNF naming quirk. This gives an agent more than enough context about the tool's actual behavior and limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and return values, then gives context, data-provenance, and a warning. Every sentence carries relevant information and the warning is signaling. It is slightly longer than strictly necessary, mainly due to the explanatory closure that SEFAZ is not an alternative source, but this is still acceptable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only tool with one required parameter and no output schema, the description fully covers what is returned, how to identify the resource, and when the call is valid. It does not explain the account parameter and does not mention possible error conditions, but these are minor gaps. The description is complete enough for an agent to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description explains the key required parameter id_nfe very well: where it comes from, how it appears in omie_get_invoice (compl.nIdNF), and how it can be named differently (nIdNfe). However, the optional account parameter is never mentioned and schema description coverage is 0%, so the agent gets good guidance for the main parameter but no an explanation for the secondary one.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the operation (obtaining the fiscal XML of an emitted NF-e), names the underlying service (ObterNfe, dfedocs), and specifies what is returned: the SEFAZ-authorized XML itself, access key, DANFE PDF, and status. It distinguishes itself from sibling omie_get_invoice by targeting the audit/fiscal-document use case rather than general invoice data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly routes the agent to the audit workflow: get the XML here and send it to auditor_fiscal_auditar_nota. It also gives a clear when-not: only works for invoices emitted by the user, because SEFAZ does not provide the emitter's own XML. It further explains how to obtain the required identifier through omie_get_invoice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.5/5.0
Disambiguation4/5

The core Omie operations are distinct by resource and action, and the descriptions actively call out edge cases like omie_lancar vs omie_create_payable/receivable and transfer vs manual entries. A few pairs (list_payables/list_receivables/list_financial_movements/list_checking_account_entries) still overlap enough that an agent could pick the wrong one on first attempt.

Naming Consistency4/5

The dominant pattern is clear and consistent: omie_verb_noun with create, get, list, update, delete, settle, cancel, and reconcile. The main deviations are the Portuguese helper omie_lancar and the unprefixed platform-level tools like authenticate, connect, marketplace, and toolkit_info, which break the otherwise regular naming scheme.

Tool Count1/5

With 50 tools, this server is far beyond the 3-15 well-scoped range and sits at the extreme end of the rubric. Most of the tools are individually purposeful, but exposing checkings, payables, receivables, reconciliation, attachments, invoicing, batch upserts, and an entire marketplace platform in one server heavily taxes an agent's tool-selection space.

Completeness4/5

The core financial lifecycle is well covered: create, read, update, delete, settle, cancel, reconcile, unreconcile, transfer, attachment upload, and batch upsert. Minor gaps exist—invoices are list-only, customers have no delete operation, and there is no dedicated get-by-id for checking accounts—but these are workable for the main reconciliation workflows.