Skip to main content
Glama

sei_buscar_documento

Read-only

Find a document using its SEI number, with optional process filter, to get internal ID and metadata.

Instructions

Busca um documento pelo número SEI (ex: SEI 2843449, SEI nº 2843449).

O número SEI é o protocoloFormatado que o usuário vê no sistema. A API do SEI não busca documentos diretamente por esse número, então esta tool usa a estratégia:

  1. Se processo informado: busca direto nesse processo (rápido). Aceita protocolo formatado (ex: 50300.018905/2018-67) ou IdProcedimento.

  2. Se não: pesquisa o número via busca textual (Solr) para encontrar o processo, depois lista os documentos para localizar o id interno

Retorna o documento com seu id interno (necessário para sei_ler_documento), tipo, metadados e o processo onde está.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
processoNo
numero_seiYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations indicate readOnlyHint=true and openWorldHint=true. The description adds valuable behavioral context: it reveals the internal fallback strategy (textual search via Solr when no process is given) and explains the effect of providing the 'processo' parameter. It also clarifies what the function returns (internal id, type, metadata, process). No contradiction with 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?

The description is concise and well-structured: it starts with the primary purpose, uses numbered steps for the strategy, and keeps each sentence focused. There is no redundant information, and the length is appropriate for the complexity of the tool.

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?

Given that an output schema exists (relieving the need to explain return values), the description adequately covers the main behavior and parameter effects. It explains the two search strategies and the purpose of the returned data. However, it could briefly mention potential failure modes or limitations (e.g., when the number is not found) to be fully complete.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It explains the 'numero_sei' parameter with format examples and the 'processo' parameter with acceptable formats (protocolo formatado or IdProcedimento) and its impact on query speed. This adds meaning beyond the schema, although more detail on required formats could be added.

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 clearly states the tool's purpose: to search for a document by its SEI number. It provides examples of the number format (e.g., 'SEI 2843449') and distinguishes its output (internal id) from related tools like sei_ler_documento. The description also explains the strategy used to locate the document, making the purpose specific and 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?

The description explains when to use the tool (when you have a SEI number) and how the optional 'processo' parameter affects performance. It also notes that the returned internal id is required for 'sei_ler_documento', providing workflow guidance. However, it does not explicitly state when not to use this tool or mention alternative tools for similar tasks, missing some exclusionary guidance.

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