Skip to main content
Glama

parse-wikitext

Read-onlyIdempotent

Render wikitext through a live wiki without saving to preview HTML, parse warnings, categories, and links before creating or updating a page.

Instructions

Renders wikitext through the live wiki without saving. Returns HTML, parse warnings, categories, wikilinks, templates, external URLs, and display title. Suited to dry-running a planned edit before create-page or update-page, or previewing standalone wikitext (template combinations, sanitizer checks) with no target page. HTML output is truncated at 75000 bytes by default, with a marker reporting how much of it was returned; a smaller wikitext fragment in a follow-up call returns the rest.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.
titleNoWiki page title providing context for magic words like {{PAGENAME}}. Defaults to "API".
wikitextYesWikitext to render
applyPreSaveTransformNoApply pre-save transform (expand ~~~~ signatures, {{subst:}}, normalize whitespace). Matches editor "Show preview" behavior.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.15.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv0.10.0
    • addedInput schema / properties / wiki
      Added value: +{
      +  "description": "Wiki 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.",
      +  "type": "string"
      +}
  3. Addedv1.0.2

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and idempotentHint, and the description reinforces this without contradiction. It adds critical behavioral detail beyond annotations: the 75000-byte truncation with a marker, and the recommendation to pass a smaller fragment in a follow-up call to retrieve the rest. This is exactly the kind of operational nuance an agent needs to plan correct calls.

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?

Two dense sentences with zero filler. The core purpose and return list are front-loaded, followed by concrete use cases and then a critical behavioral caveat. Every clause earns its place; nothing is redundant or missing.

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?

The tool has a 4-parameter schema (fully documented) and no output schema, so the description must cover return values and edge behavior. It lists all major return types and the truncation mechanism, and it contextualizes the 'title' parameter's default via schema. For an agent to call this correctly, everything essential is present.

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 description coverage is 100%, so the baseline is 3. The description does not add anything material about parameter semantics – it mentions truncation behavior but does not explain the 'wikitext' parameter's role beyond what the schema already states. It satisfies the baseline but does not exceed it.

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 opens with a specific action ('Renders wikitext through the live wiki without saving'), a clear resource, and a key qualifier that separates it from writing tools like create-page and update-page. It also enumerates outputs (HTML, warnings, categories, etc.), making the tool's function unmistakable and differentiating it from siblings such as get-page or get-revision.

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?

The second sentence explicitly names the target workflows: 'dry-running a planned edit before create-page or update-page, or previewing standalone wikitext... with no target page.' This tells an agent exactly when to use this tool and when to rely on its siblings, leaving nothing to inference.

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