Skip to main content
Glama

parse_nfe_xml

Parse NF-e or NFC-e XML to extract structured fiscal data like emitter, recipient, items, totals, and protocol from raw XML, with or without namespace.

Instructions

Parseia o XML completo de uma NF-e ou NFC-e e retorna os dados estruturados. Aceita XML com ou sem o involucro e com ou sem namespace do portal fiscal. Util para extrair emitente, destinatario, itens, totais e protocolo a partir do XML bruto.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xml_contentYesXML completo da NF-e ou NFC-e como string. Pode conter o involucro <nfeProc> ou ser a NF-e nua. Aceita XML com ou sem namespace do portal fiscal.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

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

  1. First observedv0.5.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the transparency burden. It discloses that the tool handles XML with or without the <nfeProc> wrapper and with or without fiscal namespace, and that it returns structured data. It does not mention invalid XML handling or errors, but the core behavior is clearly described.

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

Conciseness5/5

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

The description is two sentences, direct, and free of redundant wording. It front-loads the main purpose and then adds relevant edge-case information about accepted XML formats.

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?

Given the simple single-parameter interface and the presence of an output schema, the description provides sufficient context for an agent to decide and invoke the tool. It could mention validation/error behavior, but the essential information is present.

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

Parameters4/5

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

The only parameter, xml_content, has a full schema description. The tool description adds useful behavior beyond the schema by specifying that the XML may include or omit the <nfeProc> wrapper and namespace, enriching the parameter semantics.

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 tool parses complete NF-e/NFC-e XML and returns structured data, listing specific extracted fields such as emitente, destinatario, itens, totais, and protocolo. It distinguishes itself from other NFe-related tools by focusing on raw XML parsing.

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

Usage Guidelines3/5

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

The description explains when the tool is useful ('a partir do XML bruto') and mentions accepted XML variations, but it does not explicitly contrast it with sibling tools such as consultar_nfe, baixar_nfe_distribuicao, or validar_chave_nfe. Usage guidance is implied rather than explicitly stated.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AgileConecta/RTC-MCP_FISCAL'

If you have feedback or need assistance with the MCP directory API, please join our Discord server