Skip to main content
Glama

edit_page

Update specific page content while leaving the rest unchanged: replace text or sections, insert content, or delete sections in ordered, atomic writes.

Instructions

Edit parts of a page, leaving the rest as is. edits run in order, written once; if any fails nothing is written. Modes: replace_text (old_text must match once in one paragraph, or use replace_all), replace_section (keeps the heading, replaces what is under it), insert_after_section (after its subsections), insert_in_section (at=start, or at=end, the default: end of its own body before any subsection), delete_section. heading is the text, or '## Text' to pin the level.

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": {
      "page_id": "<page_id>",
      "edits": "<edits>"
    },
    "name": "edit_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsYes
dry_runNoPreview the resulting Markdown without writing
page_idYesUUID or slugId
expected_updated_atNoupdatedAt from get_page; refused if the page changed since

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the lone destructiveHint=false annotation, the description discloses the most important behavioral trait: edits are applied in order and written once, and if any edit fails nothing is written. That atomicity guarantee is exactly the kind of context an agent cannot get from annotations. It stops short of 5 because it says nothing about what is returned or permission requirements.

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 purpose, then the atomicity contract, then a compact mode glossary — no filler sentences. Some mode clauses are compressed to the point of being hard to parse, notably 'insert_in_section (at=start, or at=end, the default: end of its own body before any subsection).'

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?

For a nested-edits mutation tool with no output schema, the definition covers the risky parts well: ordering, all-or-nothing writes, mode semantics, and heading level pinning. The remaining gap is what a successful call returns (updated page content? edit results?) and whether dry_run output is the only preview surface.

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?

With 75% schema coverage the baseline would be 3, but the description adds real meaning on top: it explains that old_text must match exactly once within a single paragraph unless replace_all is set, that at=start/end controls insertion position and that end is the default placed before subsections, and that heading may carry a '## Text' level pin. Only markdown and the concurrency guard go unelaborated here.

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?

Opens with a precise verb+resource+scope: 'Edit parts of a page, leaving the rest as is,' which tells the agent this is a partial mutation rather than a full-page overwrite. It never names a contrasting sibling (e.g., update_page) to pin down the boundary, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The five modes and their per-mode rules imply when each editing style applies (text substitution vs. section replacement vs. insertion), which is genuinely useful selection guidance. However, there is no explicit statement of when to reach for this tool instead of update_page, nor any prerequisite note about needing a page_id from get_page.

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