Skip to main content
Glama
mcpware

claude-code-organizer

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
NameRequiredDescriptionDefault
categoryYesCategory of item to move
nameYesName of the item (as shown in scan_inventory results)
fromScopeIdYesSource scope ID (e.g. "global" or the encoded project directory name)
toScopeIdYesDestination scope ID

Implementation Reference

  • 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;
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcpware/claude-code-organizer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server