Skip to main content
Glama

baixar_nfe_distribuicao

Download NF-e fiscal documents from SEFAZ using a local A1 certificate, supporting search by incremental NSU, specific NSU, or access key.

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

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
Behavior5/5

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

In the absence of annotations, the description carries full responsibility for behavioral disclosure. It states that the certificate is never sent to any server, authentication is local via mTLS, and the password is never logged or included in exceptions. It also notes the prerequisite for obtaining complete XML, providing important behavioral context.

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 concise and well-structured, using a few sentences to cover the main functionality, requirements, security aspects, and modes. It avoids redundancy and stays focused on essential information.

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 provides sufficient context for an agent to decide when to use the tool and how to configure it, including modes, credentials, and prerequisites. However, it does not describe the output format or return value, which would complete the picture for the agent.

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 schema already provides detailed descriptions for all 10 parameters (100% coverage), so the baseline is 3. The description adds some context about the certificate and the event prerequisite, but it does not significantly expand on each parameter's meaning beyond what the schema already specifies.

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 the NFeDistribuicaoDFe SEFAZ service, specifying the verb 'Baixa' and the resource 'documentos fiscais'. It differentiates by mentioning the local certificate requirement and the three supported modes, making its purpose unambiguous.

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 the three operational modes (distNSU, consNSU, consChNFe) and notes the prerequisite of the 'Ciencia da Operacao' event, but it does not explicitly contrast this tool with sibling tools like consultar_nfe or validar_chave_nfe. Thus, when-to-use vs alternatives is implied rather than explicit.

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