Skip to main content
Glama

mediawiki_find_replace

Destructive

Find and replace text on a single wiki page. Supports regex, replacement of all occurrences, and preview before saving.

Instructions

PREFERRED for simple text changes on a single page.

USE WHEN: User says "replace X with Y", "fix the typo", "change the version number", "update the name".

NOT FOR: Creating/rewriting pages (use mediawiki_edit_page). Not for multi-page updates (use mediawiki_bulk_replace). Not for formatting (use mediawiki_apply_formatting).

PARAMETERS:

  • title: Page name (required)

  • find: Text to find (required)

  • replace: Replacement text (required)

  • all: Replace all occurrences (default false = first only)

  • use_regex: Treat find as regex (default false)

  • preview: Preview changes without saving (default true for safety)

  • summary: Edit summary

RETURNS: Match count and preview of changes. Set preview=false to apply. Includes revision ID, diff URL, and undo instructions.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoReplace all occurrences (default: first only)
findYesText to find (exact match or regex if use_regex=true)
minorNoMark as minor edit
titleYesPage title to edit
previewNoPreview changes without saving
replaceYesReplacement text
summaryNoEdit summary
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

TableJSON Schema
NameRequiredDescriptionDefault
undoNo
titleYes
changesNo
messageYes
previewYes
successYes
revisionNo
match_countYes
revision_idNo
replace_countYes
Behavior5/5

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

Goes beyond annotations (destructiveHint=true) by detailing authentication requirements, preview default for safety, return values including match count, revision ID, diff URL, and undo instructions.

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?

Well-structured with clear sections (USE WHEN, NOT FOR, PARAMETERS, RETURNS, NOTE), front-loaded purpose, and no unnecessary words. Every sentence adds value.

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?

Covers all aspects: usage, parameters, return values, authentication, and safety. The description is fully self-contained for an agent to use correctly, especially given the tool's complexity and sibling count.

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?

While schema coverage is 100% (baseline 3), the description adds practical context like 'preview: default true for safety' and regex caveats, enhancing understanding beyond 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?

Clearly states it's for simple text changes on a single page, uses specific verbs like 'replace', 'fix', 'change', 'update', and distinguishes from sibling tools like mediawiki_edit_page and mediawiki_bulk_replace.

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 provides 'USE WHEN' and 'NOT FOR' sections with concrete examples and alternative tools, giving clear guidance on when to use this tool vs others.

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/olgasafonova/mediawiki-mcp-server'

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