Skip to main content
Glama

write_page

Write Markdown to LegendKeeper wiki pages with mentions, callouts, tables, tasks, and images. Atomic edits use expected_version to prevent overwriting changes made in the app.

Instructions

Write Markdown to a page document. [[Name]] and text become mentions; callouts, secrets, tables, task lists and images are supported. Writes are atomic; pass expected_version (from read_document) so edits made in the app after you read the page are never overwritten.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesappend/prepend: add to the end/start. replace: replace the whole page (keep lk:keep markers to preserve special blocks). replace_section: replace the content under the heading `section` (include the heading in `markdown` to rename it). append_to_section: add to the end of that section. A missing section is created at the end of the page.
projectNoConfigured project (world) name. Omit to use the default project; see list_projects.
sectionNoHeading text for the *_section modes (case-insensitive).
documentNoDocument id or name within the resource. Omit to pick the resource's main document.
markdownYesPage content in LegendKeeper Markdown (see legendkeeper://guides/markdown).
resourceYesResource id, or its exact name/alias (case-insensitive).
expected_versionNoThe page version shown by read_document. When set, nothing is written if the page changed since then. Strongly recommended with mode='replace' or 'replace_section'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare a non-readonly, non-destructive, non-idempotent, open-world write; the description goes beyond them by disclosing atomicity and the optimistic-concurrency safeguard against overwriting app-side edits. It stops short of describing what is returned or how failures surface.

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?

Three tight sentences, front-loaded with the action, then content semantics, then the safety guarantee. Every sentence carries information an agent needs before calling.

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 7-parameter mutation tool with no output schema, the description covers content format, concurrency safety, and mode semantics delegated to a well-documented schema. Missing only return-value information and explicit sibling differentiation.

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 adds real meaning for the markdown parameter by explaining mention/link syntax resolution and supported block types (callouts, secrets, tables, task lists, images). The expected_version rationale is also clarified even though the schema already touches it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb+resource ('Write Markdown to a page document') and enumerates the Markdown features handled, so the agent knows exactly what content form is accepted. It does not, however, distinguish itself from the sibling update_document, which an agent might plausibly confuse it with.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear operational guidance: pass expected_version (from read_document) so concurrent edits are not overwritten, and the schema elaborates mode-specific behavior. There is no explicit 'use this instead of X' routing against the sibling update_document tool.

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