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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sefaz_status"
  }
}

Input 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; 62 - NFCom (autorizador da UF da empresa: MG, MS, MT ou SVRS)

Output 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. Changed2 schema fields changed
    • changedInput schema / properties / ModeloDocumento / description
      Previous value: -"Modelo do documento fiscal usado para determinar o webservice de status da SEFAZ (Padrão 55). Valores: 55 - NF-e; 65 - NFC-e"New value: +"Modelo do documento fiscal usado para determinar o webservice de status da SEFAZ (Padrão 55). Valores: 55 - NF-e; 65 - NFC-e; 62 - NFCom (autorizador da UF da empresa: MG, MS, MT ou SVRS)"
    • changedInput schema / properties / ModeloDocumento / enum
      Previous value: -[
      -  55,
      -  65
      -]New value: +[
      +  55,
      +  65,
      +  62
      +]
  2. 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"
      +}
  3. 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"
      +]
  4. First observed

TDQS

A3.8/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=true and destructiveHint=false, so the safety profile is fully covered without the description. The description adds the pre-flight-check framing, which is useful operational context, but says nothing about latency, availability of the underlying SEFAZ service, or what a degraded status implies. Nothing contradicts the annotations.

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?

Two sentences: the first states the resource and scope, the second states when to call it. The purpose and the trigger are both front-loaded with zero filler. Nothing needs trimming.

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?

With an output schema present, return values need not be explained, and the single optional enum parameter is fully documented in the schema. The only gap is the reference to 'UF e ambiente' inputs that don't exist in the schema, leaving an agent unsure how the target federative unit is determined. Otherwise complete for a simple status-check tool.

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?

There is only one optional parameter and the schema description coverage is 100%, with the enum spelling out 55/NF-e, 65/NFC-e and 62/NFCom plus the authorizer caveat. The description adds no parameter meaning at all, so the schema does all the work; this meets the baseline 3 for high coverage.

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?

The description names a specific verb ('Consulta') and resource ('status do serviço de autorização da SEFAZ'), so an agent knows exactly what it does. It is slightly undermined by referencing 'uma UF e ambiente', neither of which are inputs in the schema, which may confuse an agent about what it can control. The core purpose is nonetheless unambiguous.

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 gives explicit triggering conditions: call it 'antes de uma emissão em lote' or 'quando suspeitar de instabilidade'. That is clear when-to-use guidance, though it names no alternative or negative case. No exclusions or sibling routing are offered.

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.