move_item
Move Claude Code configuration items like memories, skills, or MCP servers between different scopes to reorganize your workspace. Use scan_inventory first to identify available items and scope IDs.
Instructions
Move a Claude Code configuration item (memory, skill, MCP server) from one scope to another. Run scan_inventory first to see available items and scope IDs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | Category of item to move | |
| name | Yes | Name of the item (as shown in scan_inventory results) | |
| fromScopeId | Yes | Source scope ID (e.g. "global" or the encoded project directory name) | |
| toScopeId | Yes | Destination scope ID |
Implementation Reference
- src/ui/app.js:1352-1411 (handler)The `doMove` function handles the API request to move an item to a different scope and includes undo logic.
async function doMove(itemRef, toScopeId, skipRefresh = false) { const item = resolveItem(itemRef); if (!item) return { ok: false, error: "Item not found" }; const fromScopeId = item.scopeId; const response = await fetch("/api/move", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ itemPath: item.path, toScopeId, category: item.category, name: item.name, }), }); const result = await response.json(); if (skipRefresh) return result; if (result.ok) { const movedKey = `${item.category}::${item.name}::${result.to}`; if (selectedItem && itemKey(selectedItem) === itemKey(item)) { selectedItem = { ...item, path: result.to, scopeId: toScopeId }; selectedScopeId = toScopeId; detailPreviewKey = null; } const undoFn = async () => { const undoResult = await fetch("/api/move", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ itemPath: result.to, toScopeId: fromScopeId, category: item.category, name: item.name, }), }).then((res) => res.json()); if (undoResult.ok) { if (selectedItem && itemKey(selectedItem) === movedKey) { selectedItem = { ...item }; selectedScopeId = fromScopeId; detailPreviewKey = null; } toast("Move undone"); await refreshUI(); } else { toast(undoResult.error, true); } }; toast(result.message, false, undoFn); await refreshUI(); } else { toast(result.error, true); } return result; }