Skip to main content
Glama
DeHor-Labs

mcp-fiscal-brasil

by DeHor-Labs

baixar_nfe_distribuicao

Download Brazilian tax invoices (NF-e) from SEFAZ using local A1 certificate. Supports incremental sync by NSU, specific NSU, or key access, with local mTLS authentication.

Instructions

Baixa documentos fiscais via NFeDistribuicaoDFe (SEFAZ) usando certificado A1 local. REQUER certificado digital A1 (.pfx/.p12) do proprio usuario instalado localmente. O certificado NUNCA e enviado a nenhum servidor - a autenticacao e feita localmente via mTLS. Suporta busca incremental (distNSU), por NSU especifico (consNSU) ou por chave (consChNFe). A Ciencia da Operacao (210200) e prerequisito para obter o XML completo (procNFe).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caminho_certificadoYesCaminho absoluto para o arquivo .pfx ou .p12.
senhaYesSenha do certificado. Nunca logada ou incluida em excecoes.
cnpj_cpfYesCNPJ (14 dig) ou CPF (11 dig) do autor da consulta.
ufYesSigla da UF do autor (ex: "SP") ou codigo IBGE (ex: "35").
modoNo"distNSU" (incremental), "consNSU" (NSU especifico) ou "consChNFe" (por chave de acesso de 44 digitos).distNSU
ultimo_nsuNoUltimo NSU recebido para modo distNSU. Default "0" busca todos.0
nsuNoNSU especifico para modo consNSU.
chaveNoChave de acesso de 44 digitos para modo consChNFe.
ambienteNo"producao" ou "homologacao".producao
timeoutNoTimeout HTTP em segundos (default 30.0).

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 adequately discloses key behaviors: requires local A1 certificate, uses mTLS, never sends certificate, supports incremental and specific queries, and notes that full XML requires prior consultation (Ciencia da Operacao). Password safety is highlighted.

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 a single, well-structured paragraph of five sentences. It front-loads the primary action and requirements, then details search modes. Every sentence provides essential information with no redundancy.

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 10 parameters and no annotations, the description covers purpose, requirements, and search modes. It mentions a prerequisite (Ciencia da Operacao) for full XML. An output schema exists, so return values are not needed. It lacks error handling or rate limits but is otherwise 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?

Although schema coverage is 100%, the description adds meaningful context by explaining the search modes (distNSU, consNSU, consChNFe) and their parameters (ultimo_nsu, nsu, chave). It goes beyond schema definitions by clarifying usage semantics like default NSU and prerequisites.

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 downloads fiscal documents via NFeDistribuicaoDFe using a local A1 certificate. It lists three search modes (distNSU, consNSU, consChNFe), distinguishing it from sibling tools like consultar_nfe or manifestar_nfe which serve different purposes.

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 for downloading fiscal documents and specifies prerequisites (certificate, CNPJ, UF). However, it does not explicitly state when to use this tool versus alternatives or provide when-not-to-use guidance, leaving agents to infer from 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/DeHor-Labs/mcp-fiscal-brasil'

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