publish_version
Publish an immutable source version to an artifact owned by this principal and remap preserved thread anchors. expectedLatestVersionId must match the current latest version, or be null for the first version, so concurrent work is never overwritten. Returns the new version plus carried, outdated, and failed comment-remapping counts.
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": {
"documentId": "<documentId>",
"expectedLatestVersionId": "<expectedLatestVersionId>",
"idempotencyKey": "<idempotencyKey>",
"source": "<source>"
},
"name": "publish_version"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Complete Markdown or sanitized HTML source for the new immutable version. | |
| documentId | Yes | ID of the artifact containing the target resource. | |
| idempotencyKey | Yes | Stable unique key for this intended change; reuse only to retry the same inputs. | |
| expectedLatestVersionId | Yes | Current latest version ID, or null only when publishing the first version. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version | Yes | Metadata for one immutable artifact version. | |
| comments | Yes |