Skip to main content
Glama

Delete a Page

delete_page
Destructive

Delete one Page from the main tree. Read the Page first and pass its exact revision. The root Page cannot be deleted. A Page that still has children is refused unless you pass recursive=true, which removes the whole branch as one change. Nothing is inverted afterwards: history only moves forward, so a delete is undone by reading it back out of history and writing the Pages again, at new ids. Pass archive_reason to archive instead, which move_page reverses.

A lock never refuses a delete — locks fence automatic curation, and you act on a member's instruction — but structure locked on the Page's read means a member deliberately chose to keep that arrangement: say which Page holds the lock and confirm before deleting it.

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>",
      "expected_rev": "<expected_rev>",
      "parent_id": "<parent_id>",
      "parent_expected_rev": "<parent_expected_rev>",
      "context_id": "<context_id>"
    },
    "name": "delete_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
page_idYesPositive serial id of the Page to delete.
parent_idYesPositive serial id of the Page's current parent.
recursiveNoAlso delete every Page below this one. Required when the Page has children; read the tree first so you know how much the branch contains.
context_idYesThe destination context id from list_contexts. Required for writes.
expected_revYesExact Page revision returned by the latest Page read.
archive_reasonNoArchive instead: what ended and what replaced it. The branch keeps its ids, prose and history outside the tree, found via search(status='archived'). For an accurate account of a subject that ended; delete what should not remain.
parent_expected_revYesExact parent revision returned by the latest Page read.

Output Schema

NameRequiredDescriptionDefault
revYes
kindYes
titleYes
page_idYes
tree_idYes
warningNo
changeset_idYes
context_run_idYes
removed_page_idYes
affected_page_idsNo
changeset_sequenceYes
collaboration_reloadedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructive=true and readOnly=false, but the description goes far beyond them: it states that deletion is not invertible and that recovery means re-writing Pages from history at new ids, that a child-bearing Page is refused without recursive, and that locks do not block a delete but warrant confirmation. These are exactly the consequence details an agent needs before a destructive call.

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 destructive core, then constraints, then the archive alternative, then the lock nuance. A few clauses overlap the schema wording (recursive's 'whole branch' phrasing), and the lock paragraph is long, but every part carries operational value rather than padding.

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 a 7-parameter destructive tool with an output schema and full annotation coverage, nothing material is missing: undo semantics, root protection, child handling, lock behavior, and the archive escape hatch are all present. Return shape is covered by the output schema, so its absence from the description is appropriate.

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 the baseline is 3, but the description adds routing meaning the schema does not: expected_rev must come from the latest read, recursive removes the branch as a single change, and archive_reason preserves ids/prose/history and is reversible via move_page. Only parent_expected_rev and context_id are left entirely to 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?

Opens with a specific verb and resource plus scope: "Delete one Page from the main tree." The scope word "main tree" and the archive contrast immediately separate it from move_page, merge_pages, and edit_page among the siblings.

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 prerequisites (read the Page first and pass its exact revision), preconditions (root cannot be deleted; children require recursive=true), and a named alternative path (pass archive_reason to archive, which move_page reverses). The lock paragraph tells the agent exactly how to proceed when it sees `structure locked`.

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