Write a page
wiki_write_pageCreate or replace a Markdown wiki page under wiki/ with required frontmatter, returning a preview unless confirm=true to prevent accidental writes.
Instructions
Create or replace one Markdown page under wiki/. content is the whole page and must start with frontmatter that has title and type. The tool sets origin: agent and last_updated (today) in it. mode='create' (default) fails if the page exists; mode='replace' overwrites it. Refused for paths outside wiki/, non-.md files, wiki/archive/, system pages (index, log, overview, ...) and pages with origin: human. Without confirm=true it writes nothing and returns a preview. Ask the user before confirm=true. A real write is atomic and adds a line to wiki/log.md. Returns JSON {path, action, written, old_bytes, new_bytes}. Put new facts for review under wiki/candidates/. Use wiki_update_frontmatter to change only tags or fields, and wiki_archive_page instead of deleting.
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": {
"path": "<path>",
"content": "<content>"
},
"name": "wiki_write_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | create (default) fails if the page exists; replace overwrites an existing page. | create |
| path | Yes | Page path relative to the repo root, always under wiki/, for example wiki/concepts/Name.md. | |
| confirm | No | Required to actually write. Without confirm=true the call returns a preview and writes nothing. | |
| content | Yes | The whole page: frontmatter with title and type, then the body. At most 1 MiB. |