Refactoring [[mcp_refactoring: Category]]Category
Tools that propose edits to the workspace. They never write files — they return a diff for the agent to apply.
Rename Object [[tool_rename_object: McpTool]]McpToolRename LSPFeature 77%Refactoring Category 72%Validation Errors SyntaxConcept 71%
Preview a workspace-wide rename as a diff.
- tool_name: qmdc_rename_object
- status: implemented
- args: path, old_id, new_id
Description [[description: text]]textRename LSPFeature 82%Refactoring Category 77%Find References McpTool 72%
Returns the exact text edits — {file, line, old_text, new_text, kind} for the definition and every reference — to rename old_id to new_id across the whole indexed workspace. The agent applies the edits itself; the tool never writes to disk (INV-3).
The rename cascades to descendants: renaming team also rewrites [[#team.config]] and [[#team.members.alice]]. Descendant definitions need no edit — they are anchored by __local_id and the parser recomposes the hierarchical id from the renamed parent.
This is the same transport-agnostic planner used by the LSP Rename feature and the CLI, so all three produce identical edit sets. new_id must be alphanumeric plus dash, underscore, or dot. Edits are bounded (see Bounded Output).
Example [[example: text]]textFind References McpTool 73%Code Action LSPFeature 69%Rename LSPFeature 69%
{
"old_id": "user",
"new_id": "customer",
"edit_count": 3,
"truncated": false,
"edits": [
{ "file": "orders.qmd.md", "line": 3, "old_text": "[[#user]]", "new_text": "[[#customer]]", "kind": "reference" },
{ "file": "orders.qmd.md", "line": 5, "old_text": "[[#user]]", "new_text": "[[#customer]]", "kind": "reference" },
{ "file": "readme.qmd.md", "line": 3, "old_text": "[[user]]", "new_text": "[[customer]]", "kind": "definition" }
]
}