Skip to main content
Glama

Status do serviço SEFAZ

sefaz_status
Read-onlyIdempotent

Consulta o status do serviço de autorização da SEFAZ para uma UF e ambiente. Use antes de uma emissão em lote ou quando suspeitar de instabilidade.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ModeloDocumentoNoModelo do documento fiscal usado para determinar o webservice de status da SEFAZ (Padrão 55). Valores: 55 - NF-e; 65 - NFC-e

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errosNoLista de erros quando a operação falha. Vazia em caso de sucesso. Cada item traz codigo, descricao e correcao.
VersaoNo
avisosNoAvisos não bloqueantes. Pode vir preenchida mesmo em sucesso.
statusNoStatus do resultado da operação: 1 = sucesso; 2 = erro (a lista erros é preenchida).
DsTipoAmbienteNo
CodTipoAmbienteNo
DsEstadoEmitenteNo
CodEstadoEmitenteNo
DsStatusRespostaSefazNo
CodStatusRespostaSefazNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed17 schema fields changed
    • addedInput schema / properties / ModeloDocumento / default
      Added value: +55
    • addedInput schema / properties / ModeloDocumento / description
      Added value: +"Modelo do documento fiscal usado para determinar o webservice de status da SEFAZ (Padrão 55). Valores: 55 - NF-e; 65 - NFC-e"
    • addedInput schema / properties / ModeloDocumento / enum
      Added value: +[
      +  55,
      +  65
      +]
    • removedInput schema / properties / TipoAmbiente
      Removed value: -{
      -  "type": "integer"
      -}
    • removedOutput schema / properties / Avisos
      Removed value: -{
      -  "description": "Avisos não bloqueantes. Pode vir preenchida mesmo em emissão bem-sucedida.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": [
      -    "array",
      -    "null"
      -  ]
      -}
    • addedOutput schema / properties / CodEstadoEmitente
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / CodStatusRespostaSefaz
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / CodTipoAmbiente
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / DsEstadoEmitente
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / DsStatusRespostaSefaz
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / DsTipoAmbiente
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / Error
      Removed value: -{
      -  "description": "Mensagem de erro da operação. Vazia (\"\") quando foi bem-sucedida.",
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / StatusSefaz
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "CodEstadoEmitente": {
      -      "type": "integer"
      -    },
      -    "CodStatusRespostaSefaz": {
      -      "type": "integer"
      -    },
      -    "CodTipoAmbiente": {
      -      "type": "integer"
      -    },
      -    "DsEstadoEmitente": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "DsStatusRespostaSefaz": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "DsTipoAmbiente": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "Versao": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": [
      -    "object",
      -    "null"
      -  ]
      -}
    • addedOutput schema / properties / Versao
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / avisos
      Added value: +{
      +  "description": "Avisos não bloqueantes. Pode vir preenchida mesmo em sucesso.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / erros
      Added value: +{
      +  "description": "Lista de erros quando a operação falha. Vazia em caso de sucesso. Cada item traz codigo, descricao e correcao.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "codigo": {
      +        "description": "Código do erro/rejeição (quando houver).",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "correcao": {
      +        "description": "Sugestão de correção, quando disponível.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "descricao": {
      +        "description": "Descrição do erro.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / status
      Added value: +{
      +  "description": "Status do resultado da operação: 1 = sucesso; 2 = erro (a lista erros é preenchida).",
      +  "type": "integer"
      +}
  2. Changed7 schema fields changed
    • changedOutput schema / properties / Avisos / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / Error / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / StatusSefaz / properties / DsEstadoEmitente / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / StatusSefaz / properties / DsStatusRespostaSefaz / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / StatusSefaz / properties / DsTipoAmbiente / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / StatusSefaz / properties / Versao / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / StatusSefaz / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
  3. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is covered. The description adds usage timing but does not disclose additional operational behavior such as authentication scope, rate limits, or how the UF/ambiente are resolved.

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 core purpose and then the usage condition. Every sentence earns its place with no redundant repetition of schema or annotation data.

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 one-parameter read-only status tool, the description plus annotations and output schema provide enough to select and invoke it correctly. The only minor gap is the mention of UF and ambiente, which are not represented in the input schema and could briefly confuse an agent about required inputs.

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 description coverage is 100%, and the single ModeloDocumento enum is fully documented in the schema. The description adds no further parameter detail and refers to "UF e ambiente" even though those are not input properties, so the baseline of 3 is appropriate.

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 gives a specific verb and resource: "Consulta o status do serviço de autorização da SEFAZ". It also states the scope (UF and ambiente), making clear how this differs from a generic health check or other status tools.

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

Usage Guidelines4/5

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

It explicitly recommends usage before batch emission and when instability is suspected: "Use antes de uma emissão em lote ou quando suspeitar de instabilidade." This is clear context, though it does not name when not to use it or point to an alternative sibling 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.