Skip to main content
Glama

Consultar MDF-e não encerrados

mdfe_nao_encerrados
Read-onlyIdempotent

Consulta na SEFAZ os MDF-e autorizados e ainda não encerrados do CNPJ da empresa, inclusive os emitidos por outro sistema. Devolve chave e protocolo de cada um, para encerrar com mdfe_encerrar.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tipoAmbiente": "<tipoAmbiente>"
    },
    "name": "mdfe_nao_encerrados"
  }
}

Input Schema

NameRequiredDescriptionDefault
tipoAmbienteYes1 - Produção; 2 - Homologação

Output Schema

NameRequiredDescriptionDefault
ErrorNoMensagem de erro da operação. Vazia ("") quando foi bem-sucedida.
AvisosNoAvisos não bloqueantes. Pode vir preenchida mesmo em emissão bem-sucedida.
motivoNo
statusNo1 - Consulta feita (lista vazia quando não há MDF-e em aberto); 3 - Erro (ver Error).
manifestosNo
codRespostaSefazNocStat da SEFAZ: 111 = há MDF-e não encerrados; 112 = nenhum.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description's job is to add operational context — and it does: the data comes from SEFAZ, it includes documents emitted by other systems (not just the token's own emissions), and it returns chave and protocolo per document. That scope note is genuinely decision-relevant information absent from the structured fields.

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, front-loaded with the scope, then the return payload and next action. No filler and no repetition of the title.

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 single-parameter read tool with a full output schema, this covers purpose, source, scope, and follow-up adequately; return values need not be enumerated. Minor residual gaps (volume of results, whether pagination or a period filter exists) are not essential given the output schema.

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 tipoAmbiente parameter has an enum plus a default and per-value descriptions, so the schema does the heavy lifting. The description adds no environment or filtering semantics beyond it, which lands at the baseline.

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?

States a specific verb (consulta) and a precisely scoped resource: MDF-e autorizados e ainda não encerrados do CNPJ da empresa. The qualifier 'inclusive os emitidos por outro sistema' sharpens the scope beyond what the name implies, and the mention of mdfe_encerrar distinguishes it from the mutating siblings.

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 clearly frames the use case as a pre-step to encerramento ('para encerrar com mdfe_encerrar'), which is explicit routing guidance to a sibling. It stops short of stating when not to use it (e.g., to inspect already-closed MDF-e), so it is strong context rather than full when/when-not guidance.

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.