Rename a tag
rename_tagRenames a tag across a wiki space, updating page bodies, front matter, and structured content while preserving unrelated content; merges with an existing target and skips pages the caller cannot edit.
Instructions
Renames a tag across one space, like the tag rename in the web app: #from in page bodies (never in code, links or HTML), from in tags:/labels: front matter (each entry edited in place, in its own style; labels: stays labels:), and the tags of tables, forms, boards, PDFs and Office files; a child tag from/x becomes to/x. Everything else in a page stays byte for byte. One Git commit authored by the connected user. Only pages the caller can edit are changed; pages the caller can open but not edit are counted in pagesSkipped and keep the old tag (pages the caller cannot open are never changed or counted). If to already exists the tags merge. Names are normalized (lowercase, no #). Requires an editor role in the space and a write-scoped token.
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": {
"space": "<space>",
"from": "<from>",
"to": "<to>"
},
"name": "rename_tag"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | New name, e.g. "project/beta"; must contain a letter and must not look like a colour (#fff) | |
| from | Yes | Tag to rename, e.g. "project/alpha" (a leading # is ignored); its children are renamed too | |
| space | Yes | Space slug |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Its new name, normalized | |
| from | Yes | The tag that was renamed, normalized | |
| pagesChanged | Yes | Pages whose tags were rewritten (body #tags, tags:/labels: front matter, sidecars) | |
| pagesSkipped | Yes | Pages that carry the tag, that the caller can open but not edit (or that could not be written); they keep the old tag. Pages the caller cannot open are not counted |