Edit a Page
edit_pageEdit one existing main-tree Page. Read the Page first and pass its exact revision. Optionally supply a non-blank replacement title, and supply either the complete replacement body or exact edits when changing prose. An edit is refused when its text is missing or ambiguous, and otherwise produces exactly the same result as sending the full body. This tool never creates a Page; a blank or omitted title keeps the current title, but an existing titleless Page must receive a non-blank title. Canonical no-op proposals are rejected, so unchanged edits create no history.
Use this when the curated layer itself is wrong or stale and Data supports the fix. For findings, research, a correction only the user attests, or other knowledge the company should keep as evidence, prefer save_data so it is ingested, deduplicated, kept current through curation, and available for Pages to cite.
A lock never refuses an edit — locks fence automatic curation, and you act on a member's instruction — but content locked on the Page's read means a member deliberately chose to keep that exact wording: say so and confirm before rewriting it.
An edited Page's prose stays subject to automatic rewriting from the sources. When a member has dictated wording they want held — not merely asked for a correction — offer to content-lock it with set_lock, and say what that costs: the prose stops absorbing new information.
When a Page you read for another task is wrong and cited Data supports the fix, offer this edit; it is recorded as the user's own change and held against later curation, so make it only with their agreement.
Pensieve references and citations
Pensieve reads return internal references as ordinary Markdown links such as
[display](https://…/r/CONTEXT/data/ID); the trailing number is that node's
id — the data_id the citation entries below take. Keep those links
exactly when writing Page prose; the server converts trusted links for the
target context back to its canonical stored form. Correction links and
detached passage links are not storable and are rejected; copy source-image
blocks whole. Do not write bare ids or wikilinks. Foreign links stay external;
cross-context links are rejected.
For every non-image Data link you add, or whose sentence you write or change,
include one or more {"data_id": ID, "quote": "…"} citation entries. Each quote
must be a short, exact, contiguous passage copied from that Data read and must
directly support the claim. edit_page carries the citations in prose it
leaves as it stands; entries for a source replace its stored quotes. Include no
citation entry for a Data node the body does not cite.
Archived Data cannot ground a current-state claim; cite the replacement the
error names. Page identity comes directly from trusted same-context resolver
links, so MCP callers do not send Pensieve's internal page_refs sidecar.
Source images and their adjacent source links may be copied back as returned;
they do not require a quote entry. Omit citations when no quote entries are
needed; missing quotes for Data links and unused entries are rejected.
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": {
"page_id": "<page_id>",
"expected_rev": "<expected_rev>",
"context_id": "<context_id>"
},
"name": "edit_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Complete replacement Markdown body. Leave empty to keep the current body; use edits for partial changes. | |
| edits | No | Exact-span edits applied in order, each {find, replace, replace_all}: find must occur exactly once unless replace_all, and an empty replace deletes it. Leave empty when supplying body. | |
| title | No | Optional replacement title. Blank or omitted keeps the current title; required when the existing Page has no title. | |
| page_id | Yes | Positive serial id of the Page to edit. | |
| citations | No | Evidence quotes as {data_id, quote} entries for the Data links this edit adds or whose sentence it changes; citations in prose left as it stands carry forward with their stored quotes. Entries for a source replace its stored quotes. Omit when none are needed, and for a title-only edit. Each quote is copied verbatim from that Data node. | |
| context_id | Yes | The destination context id from list_contexts. Required for writes. | |
| expected_rev | Yes | Exact Page revision returned by the latest Page read. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rev | Yes | ||
| url | No | Opens the written Page; for an edit, the History version it produced. | |
| kind | Yes | ||
| title | Yes | ||
| page_id | Yes | ||
| tree_id | Yes | ||
| warning | No | ||
| changeset_id | Yes | ||
| context_run_id | Yes | ||
| affected_page_ids | No | ||
| changeset_sequence | Yes | ||
| collaboration_reloaded | No |