Merge Pages
merge_pagesMerge one duplicate main-tree Page into another. Read both Pages first and pass both exact revisions. The winner keeps its id and receives the explicitly synthesised body and citations plus the loser's children, pending evidence, and inbound links; the loser is removed.
A lock never refuses a merge — locks fence automatic curation, and you act on a member's instruction — but structure locked on either Page's read means a member deliberately chose that arrangement: say which Page holds the lock and confirm before merging it away.
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": {
"winner_page_id": "<winner_page_id>",
"winner_expected_rev": "<winner_expected_rev>",
"loser_page_id": "<loser_page_id>",
"loser_expected_rev": "<loser_expected_rev>",
"merged_body": "<merged_body>",
"context_id": "<context_id>"
},
"name": "merge_pages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| citations | No | Complete evidence quote sidecar as {data_id, quote} entries for every non-image Data reference in merged_body; omit when none need quotes. It covers both Pages' surviving prose, and each quote is copied verbatim. | |
| context_id | Yes | The destination context id from list_contexts. Required for writes. | |
| merged_body | Yes | Complete Markdown body for the surviving Page after consolidating both Pages. | |
| loser_page_id | Yes | Positive serial id of the duplicate Page that will be removed. | |
| winner_page_id | Yes | Positive serial id of the canonical Page that will survive. | |
| loser_expected_rev | Yes | Exact loser revision returned by the latest Page read. | |
| winner_expected_rev | Yes | Exact winner revision returned by the latest Page read. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rev | Yes | ||
| kind | Yes | ||
| title | Yes | ||
| page_id | Yes | ||
| tree_id | Yes | ||
| warning | No | ||
| changeset_id | Yes | ||
| context_run_id | Yes | ||
| removed_page_id | Yes | ||
| affected_page_ids | No | ||
| changeset_sequence | Yes | ||
| collaboration_reloaded | No |