Skip to main content
Glama
nikolasdehor

mcp-fiscal-brasil

by nikolasdehor

parse_nfe_xml

Parse the complete XML of a Brazilian NF-e or NFC-e and retrieve structured data including emitter, recipient, items, totals, and protocol.

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

Behavior2/5

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

No annotations are provided, so the description must cover behavioral aspects. It mentions input flexibility (with/without wrapper, namespace) but does not disclose error handling, size limits, authentication needs, or consequences of invalid XML.

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, front-loads the main purpose, and contains no unnecessary words. It is highly efficient and well-structured.

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?

The description is complete for a simple parsing tool: covers input format and output content. An output schema exists, so return values are not needed in the description. Missing error handling context, but overall adequate.

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?

Schema description coverage is 100% for the single parameter, explaining the XML content format. The tool description adds no new parameter information beyond the schema, achieving baseline adequacy.

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 NF-e or NFC-e XML into structured data, specifying the resource (NF-e/NFC-e XML) and verb (parse). It distinguishes from siblings like consultar_nfe (querying) or validar_nfe_full (validation) 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 Guidelines4/5

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

The description implies usage when raw XML is available and structured data is needed, mentioning it extracts specific elements. It does not explicitly state when not to use or list alternatives, but the sibling tools provide context.

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

Install Server

Other Tools

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/nikolasdehor/mcp-fiscal-brasil'

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