Update a published document
update_docReplace the Markdown of a page you own (requires an lp_ API key). The URL stays the same; every update is kept as a revision. Pass expected_version (from get_doc) to guard against overwriting someone else's changes — a conflict returns 409 with current_version.
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>",
"markdown": "<markdown>"
},
"name": "update_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The document slug — the path part of its https://lucid.page/<slug> URL. | |
| title | No | Optional new title; omit to keep the current one. | |
| markdown | Yes | The new Markdown source (max 1 MB). | |
| expected_version | No | Optional optimistic-lock guard: the version you last read. Saves only if it still matches. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| slug | Yes | ||
| version | No | Monotonic save counter; pass as expected_version next time | |
| visibility | Yes | ||
| revision_hash | Yes | Content hash of the new revision |