Skip to main content
Glama
DeHor-Labs

mcp-fiscal-brasil

by DeHor-Labs

parse_nfe_xml

Parse NF-e or NFC-e XML to extract structured data including issuer, recipient, items, totals, and protocol. Works with or without nfeProc wrapper and 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

Behavior4/5

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

With no annotations, the description carries full burden. It explains that the tool accepts XML with/without envelope and namespace, and returns structured data. However, it does not disclose error handling behavior (e.g., malformed XML) or confirm that it is a pure local operation (no network calls). Behavior is mostly clear but missing some edge cases.

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-loaded with the main action and key resource. Every sentence earns its place, no redundancy. It is appropriately concise for a simple tool.

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 tool has an output schema (exists but not shown), so the description does not need to detail return values. It mentions extracted fields (emitente, etc.), which is sufficient. However, it omits handling of parsing errors or encoding issues. Given the simplicity, it is largely complete.

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?

Schema coverage is 100% for the single parameter 'xml_content'. The description adds meaning beyond the schema by detailing acceptable formats (with/without envelope, namespace). This provides context that helps the agent prepare the input correctly, justifying above baseline 3.

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 verb 'parse' (Parseia) and the resource 'XML completo de uma NF-e ou NFC-e'. It specifies that it returns structured data and lists the extracted fields (emitting, recipient, items, totals, protocol). This is distinct from sibling tools that query by key or validate, showing clear purpose.

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 implies usage when raw XML is available (e.g., 'Aceita XML com ou sem o involucro <nfeProc>') but does not explicitly state when to use this tool over alternatives like 'consultar_nfe' or 'validar_chave_nfe'. No exclusions or when-not-to-use guidance is given.

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

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