Skip to main content
Glama

edit_page

Modify specific parts of a Docmost page while leaving the rest unchanged, with ordered, atomic edits for text, sections, and table rows.

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. Table rows (row/after_row match a row's first cell; heading optionally scopes): update_row (values by column header, or cells for every cell), insert_row (cells, after after_row or at the table's end), delete_row.

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
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. Changed5 schema fields changedv1.2.1
    • addedInput schema / properties / edits / items / properties / after_row
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / edits / items / properties / cells
      Added value: +{
      +  "description": "Every cell, in column order",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / edits / items / properties / mode / enum
      Previous value: -[
      -  "replace_text",
      -  "replace_section",
      -  "insert_after_section",
      -  "insert_in_section",
      -  "delete_section"
      -]New value: +[
      +  "replace_text",
      +  "replace_section",
      +  "insert_after_section",
      +  "insert_in_section",
      +  "delete_section",
      +  "update_row",
      +  "insert_row",
      +  "delete_row"
      +]
    • addedInput schema / properties / edits / items / properties / row
      Added value: +{
      +  "description": "First-cell text of the row",
      +  "type": "string"
      +}
    • addedInput schema / properties / edits / items / properties / values
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "Column header to new cell text",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  2. Addedv1.1.0

TDQS

A3.6/5.0
Behavior2/5

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

The description adds real behavior the annotation does not: edits run in order, are written once, and are all-or-nothing if any edit fails — valuable transactional context. However, it enumerates delete_section and delete_row modes while the annotation declares destructiveHint=false; the description is the accurate party here, but the mismatch means an agent reading only annotations could wrongly assume nothing is removed.

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?

Dense but well ordered: the mutation contract (ordered, atomic) is front-loaded, then section modes, then table modes. Every clause carries operational meaning; the long parenthetical mode list is readable but close to the limit of a single unbroken block.

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 complex multi-mode mutation tool with no output schema, the description covers semantics, ordering and failure behavior thoroughly. It does not say what is returned after a successful edit or mention concurrency interplay with expected_updated_at beyond what the schema states, which is a minor residual gap.

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?

The schema is largely a bare enum list for mode and leaves old_text, new_text, heading, row, after_row, cells and values without inline explanation; the description supplies exactly that — match-once semantics, replace_all escape, '## Text' level pinning, start/end insertion behavior, first-cell row matching and column-header keyed values. Only expected_updated_at is left to the schema, which documents it adequately.

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?

"Edit parts of a page, leaving the rest as is" gives a specific verb plus a scoped resource, and the partial-edit framing implicitly separates it from a full-page update. It never names the alternative (e.g. update_page), so the agent must infer the boundary rather than being told it.

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?

Within the tool, guidance is strong: each mode is annotated with its matching rule (old_text must match once, or use replace_all; heading optionally scopes row matching; at=start vs the default end). What is absent is when to choose this tool over a page-level update or when it is inappropriate, so usage versus alternatives is only implied.

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