Skip to main content
Glama

Escrever seção

write_section
Destructive

Escreve o texto de uma seção ou substitui diretamente o título, subtítulo, resumo ou abstract do trabalho. Nas partes title, subtitle, abstract e abstract_translated, use somente mode "replace", sem title nem opções de seção: html substitui o campo inteiro, sem acrescentar títulos. Nas demais partes, mode "replace" (padrão) troca todo o conteúdo da seção existente com esse título (o título fica), inclusive as subseções dela: leia antes com read_section e mande de novo o que deve continuar, como as citações já feitas e as subseções. Com mode "create", cria uma seção nova, depois de after_section_title ou no fim da parte. Mande em html parágrafos (), listas, negrito e itálico; o resto do trabalho não muda. Para citar, use depois cite_in_paragraph.

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": {
      "document_id": "<document_id>",
      "html": "<html>"
    },
    "name": "write_section"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesNovo conteúdo da parte direta ou conteúdo da seção, sem o título: <p>, <ul>/<ol>, <strong>, <em> e as citações já existentes que devem ficar. No resumo e abstract, inclua também as palavras-chave.
modeNoreplace: troca o conteúdo existente; create: cria uma seção nova (somente em content, appendix e attachment).
partNoParte do trabalho (padrão content). Atenção: abstract_translated é o Resumo (em português) e abstract é o Abstract (em inglês).
levelNoSó com create: 1 para seção, 2 para subseção.
titleNoSó para content, appendix e attachment: título da seção, como aparece no trabalho. Não use nas partes diretas.
document_idYesID do trabalho.
after_section_titleNoSó com create: título da seção depois da qual a nova entra (opcional; sem ele, entra no fim da parte).
replace_subsectionsNoSó com replace em seções: true para aceitar que subseções da seção atual que não vierem em html sejam apagadas. Confirme com o aluno antes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, but the description adds the crucial scope of that destruction: replace swaps the entire section including its subsections, so existing citations and subsections must be re-sent, and replace_subsections=true deletes omitted subsections with a warning to confirm with the student. It does not describe the response or what happens on partial failures, which keeps it below 5.

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?

Front-loaded with the core action and the replace-only exception, and nearly every clause carries an operational constraint. It is a single dense block rather than a structured list, which makes the create-vs-replace rules slightly harder to scan than they could be.

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?

For an eight-parameter destructive write tool with no output schema, the description covers scope of overwrite, restricted parts, creation placement, HTML content expectations, and the read-before-write workflow. Nothing an agent needs in order to call it safely is missing.

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 coverage is 100%, so all eight parameters carry their own documentation. The description still adds cross-parameter meaning: that html replaces the whole field for direct parts with no titles inside, that title must not be sent for direct parts, and how mode interacts with part and after_section_title. That is genuine semantics beyond the schema, though it partly restates schema enum notes.

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 and resource ('Escreve o texto de uma seção') and immediately names the direct-field variant (title, subtitle, abstract, abstract_translated). An agent can distinguish it from read_section or cite_in_paragraph, both of which are explicitly referenced by name.

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?

Gives explicit when-to-use rules: 'replace' as the default for sections, 'create' only in content/appendix/attachment, and replace-only for title, subtitle, abstract and abstract_translated. It also names prerequisites (read_section first) and a follow-up tool (cite_in_paragraph for citations), which is exactly the routing guidance an agent needs.

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.

Resources