Skip to main content
Glama

Change one passage of a wiki page

edit_wiki

Replaces one passage of an existing wiki page without resending the body. Pass the exact text to replace (oldString) and what it becomes (newString) — the same contract as a code editor's Edit: oldString must occur exactly once on the page. If it is missing, or occurs more than once, nothing is written and the error says which; copy the text verbatim from get_wiki (whitespace and line breaks count) or include more surrounding text to make it unique. newString="" deletes the passage. Matching is literal, not a regex. This is the normal way to fix a sentence, update a value, or correct one rule on a page that already exists. Use write_wiki when you are composing a page or rewriting several sections at once, and mode="append" there when a section is genuinely missing. The edit is a revision like any other write: it folds into your previous write within 30 minutes unless newRevision=true, and baseRev refuses the edit when the page moved on since you read it. The response carries rev, coalesced, previousBodyChars and bodyChars, plus warnings[] when the page as a whole now strays from the skeleton — not the body. Requires a write-scope token.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "slug": "<slug>",
      "page": "<page>",
      "oldString": "<oldString>",
      "newString": "<newString>"
    },
    "name": "edit_wiki"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageYesPage slug of an existing page.
slugYesGround slug.
baseRevNoThe revision you read. If the page has moved past it, the edit is refused.
newStringYesThe replacement text. "" deletes the passage.
oldStringYesThe exact text to replace. Must occur exactly once on the page.
newRevisionNoForce a new revision instead of folding into your last write.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does: it discloses the exactly-once matching rule, that a failed match writes nothing and which error appears, literal (non-regex) matching, deletion via empty newString, 30-minute revision coalescing, baseRev refusal on a stale read, response fields, and the write-scope token requirement.

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 with the core contract, then error recovery, then sibling routing, then revision/response behavior — a logical order. It is dense but long, and the 'fix a sentence, update a value, correct one rule' list slightly restates the sibling-routing sentence, minor redundancy.

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?

With no annotations and no output schema, the description covers auth, failure modes, revision semantics and return fields, which is close to complete. It stops short of describing pagination-free return shape details only slightly, since rev/coalesced/bodyChars/warnings are named but not defined.

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

Parameters5/5

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

Schema coverage is 100% (baseline 3), and the description still adds real meaning: oldString must be copied verbatim from get_wiki with whitespace and line breaks counting, matching is literal not regex, widening the match is the fix for ambiguity, and newRevision's interaction with the coalescing window is spelled out.

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 and resource ('Replaces one passage of an existing wiki page') and immediately contrasts scope with write_wiki, so an agent can pick it apart from the sibling without opening a 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?

Gives explicit when-to-use ('the normal way to fix a sentence, update a value, or correct one rule') and when-not ('Use write_wiki when you are composing a page or rewriting several sections at once'), plus a third path (mode="append") for a genuinely missing section.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.