Skip to main content
Glama

mediawiki_apply_formatting

Destructive

Applies bold, italic, strikethrough, underline, or code formatting to specific text on a MediaWiki page, with preview by default and optional apply to all occurrences.

Instructions

BEST for adding formatting markup to specific text.

USE WHEN: User says "strike out X", "cross out the name", "make X bold", "italicize Y", "mark as code".

NOT FOR: Replacing text (use mediawiki_find_replace).

PARAMETERS:

  • title: Page name (required)

  • text: Text to format (required)

  • format: Formatting type (required):

    • "strikethrough": text (for removed/former items)

    • "bold": '''text'''

    • "italic": ''text''

    • "underline": text

    • "code": text

  • all: Format all occurrences (default false)

  • preview: Preview changes without saving. Omit to preview (default true); set preview=false to apply.

  • summary: Edit summary

RETURNS: Preview of formatting applied. 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

NameRequiredDescriptionDefault
allNoApply to all occurrences (default: first only)
textYesText to find and format
titleYesPage title to edit
formatYesFormat to apply: 'strikethrough', 'bold', 'italic', 'underline', 'code', 'nowiki'
previewNoPreview changes without applying them. Omitted means preview (the safe default): the edit is not saved and the diff is returned. Set false to apply the change.
summaryNoEdit summary (auto-generated if empty)
rationaleYesRequired one-sentence explanation of why you are making this change. Stored in the audit log for post-hoc intent reconstruction.

Output Schema

NameRequiredDescriptionDefault
undoNo
titleYes
changesNo
messageYes
previewYes
successYes
revisionNo
match_countYes
revision_idNo
format_countYes
format_appliedYes

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): the edit is not saved and the diff is returned. Set false to apply the change."
    • 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: -[
      -  "title",
      -  "text",
      -  "format"
      -]New value: +[
      +  "rationale",
      +  "title",
      +  "text",
      +  "format"
      +]
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare destructiveHint=true, idempotentHint=false, and openWorldHint=true, so the blast radius is already flagged structurally. The description usefully adds that preview defaults to true (edit not saved), that authentication with a bot password is required, and that undo instructions are returned — meaningful context beyond the annotations, though it doesn't discuss idempotency or repeated-run effects.

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 front-loaded with a label-per-section layout that is easy to scan. Slightly redundant in restating 'Set preview=false to apply' in both PARAMETERS and RETURNS, but every block earns its place overall.

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

Completeness4/5

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

For a destructive, open-world mutation tool it covers auth requirements, the safe preview default, and apply semantics; an output schema exists, so return details are largely covered elsewhere. The only incompleteness is the missing 'rationale' and 'nowiki' mentions relative to the schema.

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 the baseline is 3, but the description goes further by spelling out the literal markup each format value produces (~~text~~, '''text''', etc.), which the schema's enum-free list does not convey. It omits the schema's 'nowiki' format and the required 'rationale' parameter, a minor gap that keeps this from a 5.

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?

States a specific verb + resource ('adding formatting markup to specific text') and immediately distinguishes itself from the nearest sibling with a 'NOT FOR' clause pointing at mediawiki_find_replace. An agent can route between the two without opening either 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?

Provides explicit USE WHEN triggers with user-phrasing examples ('strike out X', 'make X bold') and an explicit NOT FOR case with the named alternative. Both the when and the when-not are covered.

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