Skip to main content
Glama

Baixar XML ou PDF de evento

arquivo_baixar_evento
Read-onlyIdempotent

Baixa o arquivo de um evento (CC-e, cancelamento, manifestação, encerramento) por chave de acesso + número sequencial. Retorna conteúdo em base64.

Input Schema

NameRequiredDescriptionDefault
ChaveNFNoChave de acesso da Nota Fiscal (44 dígitos) à qual o evento está vinculado.
NuProtocoloNoNúmero do protocolo do evento (somente dígitos). Identifica o evento específico (ex.: Carta de Correção, Cancelamento, Manifestação do destinatário) registrado para a nota fiscal.
TipoArquivoNoTipo do arquivo do evento a ser retornado. Valores: 1 - XML do evento; 2 - PDF da Carta de Correção (CC-e) ou da Manifestação do destinatário

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / NuProtocolo / description
      Previous value: -"Número do protocolo do evento (somente dígitos). Identifica o evento específico (ex.: Carta de Correção, Cancelamento) registrado para a nota fiscal."New value: +"Número do protocolo do evento (somente dígitos). Identifica o evento específico (ex.: Carta de Correção, Cancelamento, Manifestação do destinatário) registrado para a nota fiscal."
    • changedInput schema / properties / TipoArquivo / description
      Previous value: -"Tipo do arquivo do evento a ser retornado. Valores: 1 - XML do evento; 2 - PDF da Carta de Correção (CC-e)"New value: +"Tipo do arquivo do evento a ser retornado. Valores: 1 - XML do evento; 2 - PDF da Carta de Correção (CC-e) ou da Manifestação do destinatário"
  2. Changed2 schema fields changed
    • changedInput schema / properties / ChaveNF / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / NuProtocolo / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  3. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely useful behavioral context — the payload is base64-encoded, which the agent must decode — but says nothing about failure behavior (invalid key, event not found, PDF unavailable for certain event types).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with the action and the return format front-loaded; every clause carries information. The 'chave de acesso + número sequencial' fragment mildly duplicates the schema, keeping it just short of ideal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description rightly discloses that content comes back as base64. However, for a tool where all three parameters are optional, it gives no hint about which combination is needed or how TipoArquivo=2 availability varies by event type, leaving meaningful gaps for correct invocation.

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 coverage is 100%: every parameter, including the TipoArquivo enum, is documented in the schema. The description only restates the inputs, and its phrase 'número sequencial' is a slightly loose gloss on NuProtocolo (protocolo do evento), which is a minor source of ambiguity rather than added meaning. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (baixa) and resource (arquivo de um evento), enumerating the event types it covers (CC-e, cancelamento, manifestação, encerramento) and naming the two identifying inputs. It does not explicitly distinguish itself from the sibling file tools arquivo_baixar / arquivo_baixar_periodo, so an agent must infer the difference from the 'evento' qualifier.

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?

Usage is implied by the resource qualifier: use this when you need the file of a specific event identified by access key plus protocol number, rather than a whole NF-e or a period download. There is no explicit when-to-use/when-not statement nor a named alternative, leaving the agent to derive the routing from sibling names.

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.