Skip to main content
Glama

mediawiki_bulk_replace

Destructive

Update text across multiple wiki pages at once with find-and-replace, category or page-list targeting, and preview before applying.

Instructions

Update text across MULTIPLE pages at once.

USE WHEN: User says "update everywhere", "fix on all pages", "change brand name across docs", "update in all documentation".

NOT FOR: Single page changes (use mediawiki_find_replace - more efficient).

PARAMETERS:

  • find: Text to find (required)

  • replace: Replacement text (required)

  • pages: Array of specific pages (optional)

  • category: Update all pages in category (optional)

  • use_regex: Treat find as regex (default false)

  • preview: Preview changes without saving. Omit to preview (default true) — ALWAYS preview a multi-page run first; set preview=false only once the diff looks right.

  • limit: Max pages to update (default 50)

  • summary: Edit summary

WARNING: Always use preview=true first to verify matches before applying.

RETURNS: Changes per page. Set preview=false to apply all changes. Includes revision ID, diff URL, and undo instructions.

NOTE: Requires authentication (bot password) to apply changes. Anonymous sessions cannot edit.

Input Schema

NameRequiredDescriptionDefault
findYesText to find
limitNoMax pages to process (default 10, max 50)
pagesNoPage titles to process
previewNoPreview changes without applying them. Omitted means preview (the safe default): no page is saved and the per-page diff is returned. Set false to apply the changes across all matched pages.
replaceYesReplacement text
summaryNoEdit summary
categoryNoCategory to get pages from (alternative to pages)
rationaleYesRequired one-sentence explanation of why you are making this change. Stored in the audit log for post-hoc intent reconstruction.
use_regexNoTreat 'find' as a Go RE2 regex. Characters like . [ ] * + ? ( ) have special meaning; escape with backslash for literal match. Max 500 chars.

Output Schema

NameRequiredDescriptionDefault
messageYes
previewYes
resultsYes
total_changesYes
pages_modifiedYes
pages_processedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.36.0
    • changedInput schema / properties / preview / description
      Previous value: -"Preview changes without saving"New value: +"Preview changes without applying them. Omitted means preview (the safe default): no page is saved and the per-page diff is returned. Set false to apply the changes across all matched pages."
    • changedInput schema / properties / preview / type
      Previous value: -"boolean"New value: +[
      +  "null",
      +  "boolean"
      +]
  2. Changed2 schema fields changedv1.31.0
    • addedInput schema / properties / rationale
      Added value: +{
      +  "description": "Required one-sentence explanation of why you are making this change. Stored in the audit log for post-hoc intent reconstruction.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "find",
      -  "replace"
      -]New value: +[
      +  "rationale",
      +  "find",
      +  "replace"
      +]
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint, idempotentHint=false, openWorldHint) by disclosing that preview defaults to true and must be run before applying, that applying requires bot-password authentication (anonymous sessions cannot edit), and that results include revision ID, diff URL and undo instructions. This is exactly the operational context annotations cannot convey.

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 purpose, then clearly labelled USE WHEN / NOT FOR / PARAMETERS / WARNING / RETURNS sections that scan well. Slightly bloated by re-enumerating parameters already fully described in the schema.

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?

An output schema exists so return values need not be spelled out, yet the description still summarises them plus the authentication prerequisite and the mandatory preview workflow. For a destructive, non-idempotent bulk tool, nothing essential for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the parameter list largely restates the schema. It does clarify preview semantics and that pages/category are alternatives, but it omits the required 'rationale' parameter entirely and states 'limit default 50' while the schema says 'default 10, max 50' — a misleading discrepancy. Baseline 3, not higher.

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?

Starts with a specific verb+resource+scope: 'Update text across MULTIPLE pages at once.' The uppercase MULTIPLE immediately distinguishes it from the single-page sibling mediawiki_find_replace, which is named explicitly.

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?

Contains both a USE WHEN section with example user phrasings ('update everywhere', 'change brand name across docs') and an explicit NOT FOR routing to mediawiki_find_replace for single-page work. The when/when-not/alternative triad is fully present.

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