恢复到某版
gwl_restore_document_revisionRestore a document body to a chosen revision by writing a new revision record, making rollback reversible; requires edit access and optional version lock.
Instructions
把文档正文恢复到某一版修订(会新写一条修订记录,因此本身可逆)。 需要可编辑权限(403),同样受乐观锁保护:建议带 version。 当前正文已经与该版一致时返回 400(重复调用不幂等)。
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": {
"doc_id": "<doc_id>",
"rev": "<rev>"
},
"name": "gwl_restore_document_revision"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rev | Yes | 要恢复到的修订号(路径参数)。 | |
| doc_id | Yes | 文档 id(路径参数)。 | |
| version | No | 乐观锁基线版本;省略=不做版本校验。 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||