confluence_regex_replace
Find and replace text on a Confluence page using regular expressions. Applies Python re.sub() to all text nodes, supporting capture groups for precise edits.
Instructions
Find and replace text using a regex pattern on a Confluence page.
Applies re.sub() to every text node in the ADF. Supports capture groups
in the replacement string (e.g. r"\1").
Args:
page_id: A numeric page ID or a Confluence URL (including short /wiki/x/ links).
pattern: Python regex pattern to match.
replacement: Replacement string (supports backreferences like \1).
version_message: Optional message describing the change.
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": {
"page_id": "<page_id>",
"pattern": "<pattern>",
"replacement": "<replacement>"
},
"name": "confluence_regex_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | ||
| pattern | Yes | ||
| replacement | Yes | ||
| version_message | No |