Skip to main content
Glama

update-page

DestructiveIdempotent

Replace the existing content of a wiki page and return the new revision ID. Supports edit-conflict detection, section edits, and append/prepend modes.

Instructions

Replaces the existing content of a wiki page and returns the new revision ID. Fails if the page does not exist; for new pages, use create-page. Pass latestId (obtained from get-page with metadata=true) to enable edit-conflict detection: if the page has been edited since that revision, the update is rejected rather than silently clobbering concurrent changes. For large pages, three modifiers avoid shipping the full source: section=N edits one section (pairs with get-page section=N for reads), section='new' adds a new heading section, and mode='append' or 'prepend' sends a delta. Each call is a separate revision; for chains of mode='append' calls, re-fetching latestId between calls confirms the previous chunk landed before the next.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
botNoMarks the edit as a bot edit, which Special:RecentChanges hides by default. Takes effect only when the authenticated account has the `bot` right (granted by the bot group, or by the high-volume grant on a bot password or OAuth consumer); without it the edit saves unflagged and the response reports botMarked: false. Use when performing bulk or automated edit runs, or when the user requests it.
modeNoAdds source to the existing content instead of replacing it: 'append' to the end, 'prepend' to the start.
wikiNoWiki to target, as a key from the mcp://wikis/ resources (e.g. en.wikipedia.org), or the full mcp://wikis/ URI. Omit to use the default wiki.
titleYesWiki page title
sourceYesThe content to write, in the existing page's content model. Interpreted as the full page by default; as the given section's content when section is set; or as a delta (appended or prepended) when mode is set.
commentNoSummary of the edit
sectionNoSection to edit: 0 (lead), 1..N (existing heading sections), or 'new' to append a new heading section.
latestIdNoBase revision ID for edit-conflict detection; obtain from get-page with metadata=true. If omitted, the update is applied without conflict detection.
sectionTitleNoHeading for a new section; required when section='new', rejected otherwise.
Behavior5/5

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

The description discloses important behaviors beyond annotations: failure on non-existent page, conflict detection with latestId, each call creates a new revision, and chaining mode='append' requires re-fetching latestId. Bot flag behavior is also detailed. No contradiction with annotations.

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?

The description is a dense single paragraph but front-loads the main purpose. It is relatively concise given the detail, though could benefit from minor structuring. No fluff or redundancy.

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?

Despite no output schema, the description mentions return value (new revision ID). It covers failure conditions, conflict detection, and all parameter use cases. For a tool with 9 parameters and 2 required, it is fully complete.

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 baseline is 3. The description adds valuable context: latestId origin, section numbering/indexing, mode direction. This enhances understanding without being necessary, pushing score to 4.

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 clearly states the tool replaces existing page content and returns the new revision ID. It distinguishes from create-page for new pages, and mentions modifiers like section and mode. The verb 'replaces' and resource 'content of a wiki page' are specific.

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?

Explicitly instructs to use create-page for new pages, explains edit-conflict detection with latestId, and provides guidance on when to use section and mode. It also describes when not to use (page must exist). Alternatives like create-page are mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ProfessionalWiki/MediaWiki-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server