Skip to main content
Glama

mediawiki_find_replace

Destructive

Find and replace text on a single wiki page. Preview changes before saving, with options for regex and replace all.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rationaleYesRequired one-sentence explanation of why you are making this change. Stored in the audit log for post-hoc intent reconstruction.
titleYesPage title to edit
findYesText to find (exact match or regex if use_regex=true)
replaceYesReplacement text
use_regexNoTreat 'find' as a Go RE2 regex. Characters like . [ ] * + ? ( ) have special meaning; escape with backslash for literal match. Max 500 chars.
allNoReplace all occurrences (default: first only)
previewNoPreview changes without saving
summaryNoEdit summary
minorNoMark as minor edit

Output Schema

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

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

Beyond the destructiveHint annotation, description discloses preview mode with default true for safety, returns match count and preview, and mentions undo instructions. This adds valuable behavioral context.

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?

Well-structured with headings and front-loaded usage guidance, but the parameter list is incomplete and the description is somewhat lengthy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite good annotations and output schema, the description omits the required 'rationale' parameter and 'minor' boolean, which are present in the schema. This gap reduces completeness.

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 baseline is 3. Description adds some defaults (e.g., all: first only, preview: true) but omits two parameters (rationale, minor) from its parameter list, limiting added value.

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 is for simple text changes on a single page, with specific verbs like 'replace X with Y'. It distinguishes from siblings by naming alternatives 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 cases ('User says replace X with Y') and non-use cases ('Not for creating/rewriting pages, multi-page updates, formatting') with named alternatives.

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