Skip to main content
Glama

dfe_sincronizar

Read-onlyIdempotent

Puxa os documentos fiscais NOVOS emitidos contra este CNPJ (nota de fornecedor, evento, CT-e) — NFeDistribuicaoDFe. COMO USAR: chame com ult_nsu: "0" na primeira vez. A resposta traz proximo_nsu — passe ELE na chamada seguinte, sem alterar. Repita até fim_da_fila: true. PARE quando fim_da_fila for true. Continuar consultando depois disso é o que a SEFAZ pune com bloqueio de 1 hora no CNPJ. Cada documento vem com completo: true = XML íntegro da nota (dá para auditar em auditor_fiscal_auditar_nota); false = apenas RESUMO (chave, emitente, valor), que é o que a SEFAZ entrega enquanto o destinatário não fizer a manifestação. ATENÇÃO: este serviço NÃO devolve as notas que VOCÊ emitiu — só as recebidas. Para auditar a própria emissão, pegue o XML no seu ERP (ex.: omie_get_invoice_xml).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNo
ult_nsuNo
forcar_nsuNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=true, idempotentHint=true, destructiveHint=false), the description discloses critical behavior: continuing to poll after fim_da_fila causes a 1-hour SEFAZ block, documents may come as full XML or summary depending on manifestação, and the response contains cursor fields. This materially helps the agent avoid a harmful misuse.

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?

Although longer than average, the description is densely structured with labeled sections (COMO USAR, ATENÇÃO) and every sentence carries actionable information. The critical warning about SEFAZ blocking earns its place, and the purpose statement is front-loaded.

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?

For a paginated synchronization tool with no output schema, the description covers the full lifecycle: initial call, cursor advancement, stop condition, response fields, and the difference between complete XML and summary data. The only notable gaps are the undocumented account and forcar_nsu parameters.

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 description thoroughly explains ult_nsu semantics and response cursor usage, which adds real meaning beyond the bare schema. However, schema description coverage is 0% and the description does not clarify the meaning of account or forcar_nsu, leaving the agent to infer those two parameters.

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 opens with a specific verb and resource: it fetches NEW fiscal documents issued against this CNPJ (NFeDistribuicaoDFe), listing document types. It also differentiates itself by explicitly stating it returns only received documents, not ones the user emitted, which helps distinguish it from siblings.

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

Usage Guidelines5/5

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

The description gives an explicit step-by-step protocol: start with ult_nsu '0', pass proximo_nsu back unchanged, repeat until fim_da_fila is true. It also provides an exclusion rule: for auditing your own emissions, get the XML from the ERP instead of this tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.