Skip to main content
Glama

Create or update a wiki page

write_wiki

Writes one wiki page. Creates it if the page slug is new, updates it otherwise — you do not need to check first. The wiki is the project's encyclopedia: one page is one entry, and its body is the current spec and rules of that thing. It is a tree read front to back: an overview page at the top, chapter pages under it, entries under those — place every page with parent (a page slug or id) and position (its order among siblings), and check list_wiki order="tree" to see where it belongs. For a new wiki, follow the table of contents in umtri://templates/wiki. The title is a plain noun for the thing in the reader's language (조직, 배포, Billing) — no dash, colon, parenthetical or sentence; the description goes in the lead. Give every page a kind — overview (the top page and chapter pages that introduce what is under them), concept (a product/domain concept or model), component (how one part of the system works), rule (a convention that must be kept), glossary (the project's vocabulary). Write it to this skeleton: a lead paragraph first (1–3 sentences saying what the thing is — not a heading, quote or list), then "## 스펙" / "## Spec" (how it works now; break it down with ###), then "## 규칙" / "## Rules" (invariants, prohibitions, required order). concept and component need Spec; rule needs Rules; overview and glossary are free-form after the lead. No other top-level (##) sections. Background, history, rejected alternatives and side notes go into footnotes — [^name] in the text, [^name]: … at the end — not into the body. A reason stays in the body only if someone changing the code would get it wrong without it. Write what the tree cannot hold and what a maintainer would otherwise have to reconstruct: why a decision went the way it did, the vocabulary this project uses, what an investigation concluded. Do not restate the structure — that is what nodes are for. A page is a description, not a log. Write it in the present tense, as a reference entry for the thing: how it works now, and the reasons that still constrain it. Do not append what you just did, do not add dated entries or a change-history section, do not keep progress checklists here — those go to bugs, plan nodes, list_events, and record_commit, and the page's own past is already kept in its revisions. When something changes, rewrite the sentence that is now wrong rather than adding a sentence saying it changed. mode="replace" (default) overwrites the whole body — read the page first, or you will drop what was there; this is the normal way to rewrite a page. To change one passage of an existing page, use edit_wiki instead — it takes the exact text and its replacement, so a one-line fix on a long page does not resend the whole body. mode="append" is the narrow case: adding a section the page genuinely lacked, never tacking on this session's summary. mode="restore" puts an earlier revision back: pass rev= and nothing else, and the page returns to what it said then. node attaches the page to a node; omit it and the page floats free, which is fine and common early on. Attach it later once the tree has a place for it. Deleting that node detaches the page rather than deleting it. Every write is kept as a revision, so a replace that drops prose can be undone (list_wiki_revisions, then mode="restore"). Consecutive writes by the same actor within 30 minutes fold into one revision instead of piling up, which means the body from before your session stays recoverable as its own revision no matter how many times you rewrite the page now. Pass newRevision=true when the page moves to a new stage rather than being polished further — most importantly when you first write back what you actually built over a page that until now held the plan. Folding is judged by clock and author, which cannot tell "still drafting" from "the plan became the thing"; only you know that, and without the flag the plan is quietly overwritten by its own outcome. rename moves the page to a new slug, keeping its id and its whole revision history — do not create a new page and delete the old one, that throws the history away. The response tells you what the write did: rev is the revision it landed in, coalesced says whether it folded into your previous one, and previousBodyChars is how long the body was before you wrote. If previousBodyChars is much larger than what you just wrote, you replaced someone's work — check list_wiki_revisions before moving on. The body itself is not echoed back — bodyChars is its length now; re-read with get_wiki if you need the text. baseRev is optional and is how you avoid clobbering a concurrent edit: pass the rev you read, and the write is refused if the page moved on since. Use it when you read, think, then write. The response carries warnings[] when the page strays from the skeleton or reads like a log (status banners, dated headings, checklists, change-history sections, unmatched footnotes). The write is saved either way — fix what they point at and write again. The change also lands in the ground's history (list_events, entityType="wiki"), where the body is recorded as a length delta rather than a copy of the prose — the prose itself lives in the revisions. 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>"
    },
    "name": "write_wiki"
  }
}

Input Schema

NameRequiredDescriptionDefault
revNoWith mode="restore": the revision number to bring back (from list_wiki_revisions).
bodyNoMarkdown body. With mode="append" this is the text to add. Ignored by mode="restore".
kindNoPage kind — decides the required sections. Give it when creating. Omit to keep the current kind.
modeNo"replace" (default) overwrites the body — the normal way to update a page; "append" adds a missing section to the end (not a session summary); "restore" brings back the revision named by rev.
nodeNoNode id to attach to. null detaches. Omit to leave the current attachment untouched.
pageYesPage slug — lowercase letters, digits, hyphens. The name humans use, e.g. "deploy-notes".
slugYesGround slug.
titleNoDisplay title. Required when creating a page.
parentNoParent page (slug or id) — where this page sits in the table of contents. null moves it to the top level (only overview pages belong there). Omit to keep it.
renameNoNew page slug. Keeps the id and the revision history; refused if that name is taken.
baseRevNoThe revision you based this write on. If the page has moved past it, the write is refused instead of overwriting.
positionNoOrder among siblings under the same parent (ascending; pages without one come after, by title). Omit to keep it.
newRevisionNoForce a new revision instead of folding into the last one. Use when this write ends one stage of the page and begins another — above all when replacing a plan with what was actually built.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/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 revision history retention, 30-minute author-coalescing of consecutive writes, newRevision overriding that fold, rename preserving id and history, node deletion detaching rather than deleting the page, baseRev refusing concurrent clobbers, warnings[] on skeleton/log violations with the write still saved, the history entry recorded as a length delta, and the write-scope token requirement. The destructive edge (replace dropping prose, detectable via previousBodyChars) is called out with a recovery path.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is high-value but the prose is a single dense block of ~1200 words mixing page-authoring style guidance (title grammar, skeleton sections, footnotes, tense) with tool mechanics; the mechanical contract is buried mid-paragraph rather than front-loaded. Bold markers help but the agent must scan a long wall to find mode semantics and the response fields, so it is informative yet poorly partitioned.

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 13-parameter mutation tool with no output schema, the description covers the response shape (rev, coalesced, previousBodyChars, bodyChars, warnings), the revision model, conflict handling, and cross-tool recovery (list_wiki_revisions, get_wiki). The wiki content-standard material, while useful, is domain policy that competes with the call contract rather than completing it.

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 already 100%, so the baseline is 3; the description earns a 4 by adding meaning the schema does not carry — why newRevision exists ('folding is judged by clock and author… only you know that'), what previousBodyChars/coalesced/bodyChars in the response mean, when baseRev matters ('when you read, think, then write'), and node's detach semantics. It adds less on title/position beyond restating intent, keeping it short of 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 (writes one wiki page) and immediately resolves the create-vs-update ambiguity: 'Creates it if the page slug is new, updates it otherwise.' It also differentiates itself from edit_wiki (passage-level edits) and delete_wiki, so an agent can route correctly 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?

Explicit when-to-use guidance for each mode: replace is 'the normal way to rewrite a page', append is 'the narrow case: adding a section the page genuinely lacked', restore requires rev and nothing else. It names the alternative explicitly ('To change one passage of an existing page, use edit_wiki instead') and gives exclusions ('never tacking on this session's summary'), plus a prerequisite check against list_wiki order="tree" for placement.

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.