Skip to main content
Glama

editar

Replace exact text snippets in OneNote pages by specifying a page ID and old/new pairs. All changes are validated before sending, so failed edits leave the page unchanged.

Instructions

Antes de escrever, leia a spec (ler_spec): não invente sintaxe. Antes de editar, leia a página (ler_pagina) se ainda não leu; imite títulos, cores e padrões vizinhos. Faça a menor edição possível. Depois de edição estrutural, releia. Relate os avisos. Título vai no parâmetro, nunca no corpo.

Troca trechos. Cada antigo precisa aparecer em exatamente um bloco (ou use todas=true). Tudo é validado antes de enviar; se uma troca falhar, nada é enviado. novo não pode esvaziar um bloco inteiro: para remover texto, troque por outro texto. Célula de tabela regrava a tabela inteira. Imagem/anexo existente não se edita. Exemplo: [{"antigo": "R$ 99", "novo": "R$ 89"}]. O antes fica num diário local.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trocasYes
pagina_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: validation is atomic (if one swap fails, nothing is sent), `novo` may not empty an entire block, table cells rewrite the whole table, existing images/attachments cannot be edited, and prior state is kept in a local log. These are exactly the destructive/side-effect traits an agent needs.

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-loads prerequisites, then mechanism and constraints, then an example — a sensible order. Dense but nearly every sentence carries a rule or a warning; a little tightening is possible.

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?

Covers workflow, atomicity, per-field constraints and failure behavior for a mutation tool with no annotations and no output schema. Return/warning format is only gestured at ('Relate os avisos'), so one gap remains.

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?

Adds real meaning beyond a 0%-coverage schema: `antigo` must appear in exactly one block unless `todas=true`, `novo` cannot blank a block, and swap semantics are illustrated with a concrete example. Some overlap with the nested Troca property descriptions keeps this from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The generic name 'editar' is rescued by 'Troca trechos', which pins the tool to excerpt-swap editing on a page rather than free-form writing. It implies a distinct mechanism from siblings like inserir/acrescentar but never names them, so differentiation is inferred rather than explicit.

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 preconditions (read the spec via ler_spec first, read the page via ler_pagina before editing, re-read after structural edits) and directs the agent to imitate existing titles/colors/patterns and make the smallest possible edit. This is genuine do-this-before-that workflow guidance.

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