confluence_comment_reanchor
Fix drifted Confluence inline comments by re-anchoring them to specified text in the page's ADF, with optional dry-run validation.
Instructions
Move an inline comment's anchor to a new run of text in a Confluence page's current ADF, then write the page back in one update — the fix for a comment flagged as drifted/mark_lost by confluence_comment_audit. Pass the inline comment_id and the exact anchor_text to move it to; match_index (1-based) disambiguates when the text occurs more than once. The anchor may span multiple runs (e.g. a phrase split by bold) but not a block boundary. Operates entirely on ADF — it never round-trips through JFM, which would discard the annotation marks. Set dry_run: true to validate and preview the move without writing. Mirrors omni-dev atlassian confluence comment reanchor.
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": {
"id": "<id>",
"comment_id": "<comment_id>",
"anchor_text": "<anchor_text>"
},
"name": "confluence_comment_reanchor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Confluence page ID. | |
| dry_run | No | When true, validate and return what would change without writing the page. Defaults to `false`. | |
| comment_id | Yes | The inline comment ID to re-anchor. | |
| anchor_text | Yes | Exact text on the current page to move the comment's anchor to. | |
| match_index | No | 1-based occurrence to anchor to when `anchor_text` appears more than once on the page. Required for ambiguous anchors; rejected if out of range. |