Skip to main content
Glama

sei_editar_secao

Idempotent

Edit editable sections of an SEI document. Automatically includes all sections for submission, resolves document ID, and handles character encoding conversion.

Instructions

Altera o conteúdo de seções editáveis de um documento interno SEI.

Parâmetros:

  • id_documento: ID do documento

  • secoes: lista de seções a alterar, cada uma com:

    • idSecaoModelo: ID do modelo da seção (obtido via sei_listar_secoes)

    • conteudo: novo conteúdo HTML da seção (não é necessário incluir seções somenteLeitura — são preenchidas automaticamente com o conteúdo original)

  • versao: versão do documento (se omitida, obtida automaticamente)

  • dry_run: NÃO grava nada; devolve o payload exato que seria enviado (todas as seções, já normalizadas, com tamanhos em bytes). Use para inspecionar/isolar um problema numa chamada só, em vez de tentativa e erro.

  • validar_referencias: confere se alguma âncora id="lnkSeiNNNN" está usando número SEI em vez do id interno (link morto). Avisos vão em _avisos.

O conteúdo deve ser HTML com as classes CSS do SEI (ex: Texto_Justificado). Entidades HTML ( , ç, é, …) são convertidas para UTF-8 literal antes do envio — o SEI aceita, e isso evita que elas se acumulem a cada ciclo ler→reenviar. Caracteres fora do ISO-8859-1 continuam sendo convertidos para entidades numéricas (exigência do wssei).

IMPORTANTE: O SEI exige que TODAS as seções sejam enviadas. Esta tool faz isso automaticamente — basta informar as seções que deseja alterar.

O id_documento aceita número SEI (protocoloFormatado) ou id interno — é resolvido automaticamente e o documento resolvido é ecoado no retorno (_documento_resolvido), para evitar gravar no documento errado.

Se o Cloudflare bloquear a escrita por WAF, a tool sobe uma escada de tentativas (normalização → neutralização do cabeçalho base64 regenerável) e, se ainda assim falhar, relata exatamente o que foi tentado.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
secoesYes
versaoNo
dry_runNo
id_documentoYes
validar_referenciasNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations indicate readOnlyHint=false (write), idempotentHint=true, destructiveHint=false. The description adds: automatic normalization of all sections, HTML entity conversion, Cloudflare retry logic, and echo of resolved document to prevent writing to wrong document. 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is thorough but slightly long; however, it is well-structured with paragraphs and bullet points in plain text. Every sentence adds value for a complex tool, earning its place.

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 5 parameters, presence of output schema (though not shown), and annotations, the description covers all necessary aspects: purpose, parameter details, behavioral notes (entity conversion, retry), and output fields like _documento_resolvido and _avisos. It is complete for a tool of this complexity.

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?

Schema description coverage is 0%, but the description fully explains each parameter: id_documento (SEI number or internal ID), secoes (with subfields idSecaoModelo and conteudo), versao (auto if omitted), dry_run (test mode), validar_referencias (checks anchors). It adds meaning beyond the schema.

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 verb 'Altera' (modifies) and the resource 'seções editáveis de um documento interno SEI'. It distinguishes from sibling tools like sei_listar_secoes (list sections) and sei_ler_documento (read document) by specifying it edits content.

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?

Explicit guidance is provided: how to obtain idSecaoModelo via sei_listar_secoes, that only changed sections need to be sent, use of dry_run for testing, HTML entity handling, Cloudflare WAF retry, and id_documento resolving. Alternatives like dry_run vs. actual write are clearly explained.

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