Skip to main content
Glama

sei_consultar_documento_externo

Read-only

Retrieve metadata of an external document by ID (internal or protocol). Returns type, date, access level; includes privacy notice for restricted documents.

Instructions

Consulta metadados de um documento externo pelo ID.

Aceita tanto o id interno (ex: "3149544") quanto o número SEI / protocoloFormatado (ex: "2867926") — auto-resolve via pesquisa Solr quando necessário.

Retorna informações como tipo, data, nível de acesso, etc. Para baixar o conteúdo use sei_baixar_anexo ou sei_ler_documento. Disponível desde mod-wssei 2.0.0 (SEI 4.0.x).

Quando o documento é restrito ou sigiloso (nivelAcesso 1 ou 2), a resposta inclui o campo _aviso_acesso — aviso INFORMATIVO de privacidade, NÃO erro de permissão. Os metadados foram retornados normalmente; não tente trocar de unidade ou rotas alternativas. Se falhar com erro inesperado, use sei_versao para verificar a versão.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_documentoYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses ID auto-resolution via Solr, special behavior for restricted documents (including the _aviso_acesso field and explicit instructions not to change units), and version dependency. It also clarifies that the restricted document notice is informative, not an error.

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 concise, front-loaded with the purpose, and each sentence adds value. It covers parameter details, special behavior, error handling, and alternatives without redundancy.

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

Completeness5/5

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

Given the tool has one parameter, an output schema, and readOnlyHint, the description is complete. It explains parameter flexibility, return metadata summary, special return fields, and error handling. No gaps remain for agent invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema only defines 'id_documento' with no description. The description adds critical semantics: it accepts both internal ID and protocol number, and auto-resolves when necessary. This fully compensates for the 0% schema description coverage.

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 first sentence clearly states the tool's purpose: 'Consulta metadados de um documento externo pelo ID.' It specifies the action (consultar metadados), resource (documento externo), and mechanism (pelo ID). The description distinguishes it from siblings like sei_ler_documento and sei_baixar_anexo, which handle content retrieval.

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?

Explicitly provides when-to-use guidance: 'Para baixar o conteúdo use sei_baixar_anexo ou sei_ler_documento.' It also includes version availability and error recovery advice ('Se falhar com erro inesperado, use sei_versao para verificar a versão.'), offering clear context for appropriate usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SEI-Pro/mcp-seipro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server