Skip to main content
Glama

Update wiki page

update_wiki_page
Destructive

Edit a wiki page: retitle it, change its body, move it under another parent (or to the top of its space), or set its labels. Identify it by 'id', or by 'spaceKey' + 'title'. To change part of the body, pass 'edits' (exact find-and-replace on the Markdown source, each 'oldText' occurring exactly once) or 'replaceSection' — the answer says where each landed, not the page, so a one-line fix to a long page costs one line. 'markdown' replaces the whole body — read it first with get_wiki_page(withMarkdown: true) and edit that, or the page's links, images and macros are dropped; 'appendMarkdown' adds to the end and leaves what is there untouched. Mention someone as @Their Name, the wiki's own form. Requires permission to edit the page. A page with ```anim blocks answers 'anims': per block, whether it plays or every problem with where it stands. Answers with 'notified' (who this actually reaches) and 'unresolvedMentions' (what looked like a mention and reached nobody, each with a reason) — a wrong handle is stored as written and never refused, so that list is the only sign it did not land.

Input Schema

NameRequiredDescriptionDefault
idNoPage id (as returned by search_wiki).
editsNoExact replacements in the page's Markdown source — the text get_wiki_page returns with 'section', 'offset' or withMarkdown: true. Every 'oldText' is matched against the page as you read it (not against the result of the other edits) and must occur exactly once unless 'replaceAll' is set; if any edit does not fit, none is applied. Pair with 'expectedVersion'.
titleNoCurrent page title, when identifying the page by title.
labelsNoLabels to set, space or comma separated. Replaces the existing set. Stored in lower case, except a label starting with '$', which is kept exactly as written; list_wiki_labels shows the ones the space already uses.
messageNoShort note for the page history, e.g. why you changed it.
markdownNoThe complete new body as Markdown — replaces what is there. Carries $…$ / $$…$$ LaTeX formulas and the wiki's macros on a line of their own ({toc}, {children}, {info} … {info}, {expand:title=…} … {expand}). A theorem, lemma, proposition, corollary, conjecture or question is a block of its own — ::: theorem {#thm:label status=computer number=5.8 title="…"} on its line, the statement, then ::: — read into the project's register of claims at the save (list_claims); 'claims' in the answer says which.
newTitleNoNew title. The page's existing links follow the rename.
parentIdNoMove the page under this parent page id.
spaceKeyNoSpace key, when identifying the page by title.
minorEditNoMark this as a minor edit in the history.
toTopLevelNoMove the page to the top of its space, out from under any parent, so it sits beside the space's other root pages. Use this instead of parentId/parentTitle — a tool argument has no way to say 'no parent' by leaving one out.
parentTitleNoMove the page under the page with this title, in the same space.
appendMarkdownNoMarkdown to add to the end of the page, leaving the rest as it is. Same syntax as 'markdown'.
replaceSectionNoReplace one whole section: 'section' names it as get_wiki_page's 'section' does (anchor or heading text), 'markdown' is what replaces it — heading line included, as reading the section returned it. Can be combined with 'edits' elsewhere on the page.
expectedVersionNoThe version you read (from get_wiki_page). If the page has moved on since, the edit is refused instead of overwriting someone else's.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / markdown / description
      Previous value: -"The complete new body as Markdown — replaces what is there. Carries $…$ / $$…$$ LaTeX formulas and the wiki's macros on a line of their own ({toc}, {children}, {info} … {info}, {expand:title=…} … {expand})."New value: +"The complete new body as Markdown — replaces what is there. Carries $…$ / $$…$$ LaTeX formulas and the wiki's macros on a line of their own ({toc}, {children}, {info} … {info}, {expand:title=…} … {expand}). A theorem, lemma, proposition, corollary, conjecture or question is a block of its own — ::: theorem {#thm:label status=computer number=5.8 title=\"…\"} on its line, the statement, then ::: — read into the project's register of claims at the save (list_claims); 'claims' in the answer says which."
  2. Changed1 schema field changed
    • changedInput schema / properties / labels / description
      Previous value: -"Labels to set, space or comma separated. Replaces the existing set."New value: +"Labels to set, space or comma separated. Replaces the existing set. Stored in lower case, except a label starting with '$', which is kept exactly as written; list_wiki_labels shows the ones the space already uses."
  3. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations mark this as destructive, and the description substantiates why: whole-body replacement drops links, images, and macros unless read first, labels replace the existing set, and wrong mention handles are stored without refusal. It also notes the edit permission requirement and the atomic 'all or none' behavior of find-and-replace edits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense because the tool is complex, but it is front-loaded with the core purpose and then proceeds through identification, body-edit modes, mention handling, permissions, and return quirks. Every sentence contributes operational value, and there is no filler.

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 15-parameter destructive tool with no output schema, the description covers the missing output context sufficiently: it mentions 'notified', 'unresolvedMentions', 'anims', and 'claims' where relevant. It also fills the behavioral gaps that annotations alone do not cover, such as permission requirements and link-breaking replacement risk.

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?

Although schema coverage is already 100%, the description adds meaningful semantics beyond the schema: exact-match oldText behavior, per-edit landing feedback, the mention syntax, and the distinction between full-body and append modes. It also explains that 'replaceSection' and 'edits' can be combined elsewhere on the page.

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?

The description opens with a specific verb and resource: 'Edit a wiki page,' then enumerates the exact operations: retitle, change body, move, and set labels. It also names the two identification modes, so an agent can distinguish this from read-only or creation tools without opening the schema.

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?

It explicitly routes body edits among 'edits', 'replaceSection', 'markdown', and 'appendMarkdown', including the critical warning to read the page first with get_wiki_page(withMarkdown: true) before replacing the whole body. That is clear when-to-use and alternative-selection guidance rather than implied context.

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