Rewrite a doc
update_docReplaces a doc's title and text. Pass the revision from get_doc as baseRevision and a new UUID as mutationId, and reuse both on a retry; a conflict means the person changed it since, so read it again and keep their work.
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": {
"workspace": "<workspace>",
"docId": "<docId>",
"title": "<title>",
"content": "<content>",
"baseRevision": "<baseRevision>",
"mutationId": "<mutationId>"
},
"name": "update_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docId | Yes | Doc id from search, fetch or create_doc. | |
| title | Yes | ||
| layout | No | Page layout from get_doc; default keeps it. | |
| content | Yes | ||
| workspace | Yes | Workspace slug from workspaces.list, e.g. "acme". | |
| mutationId | Yes | ||
| baseRevision | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| text | Yes | ||
| docId | Yes | ||
| title | Yes | ||
| revision | Yes | ||
| textTruncated | Yes |