Skip to main content
Glama
mcpware

claude-code-organizer

delete_item

Remove a Claude Code configuration item like memory, skill, or MCP server entry. Use scan_inventory first to identify items and their scope IDs for deletion.

Instructions

Delete a Claude Code configuration item (memory, skill, MCP server entry). Run scan_inventory first to see available items and scope IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesCategory of item to delete
nameYesName of the item (as shown in scan_inventory results)
scopeIdYesScope ID where the item lives

Implementation Reference

  • The doDelete function acts as the handler for the delete_item action, responsible for preparing a backup of the item before calling the /api/delete endpoint and managing the undo logic for restoring the item if needed.
    async function doDelete(itemRef, skipRefresh = false) {
      const item = resolveItem(itemRef);
      if (!item) return { ok: false, error: "Item not found" };
    
      let backupContent = null;
      let mcpBackup = null;
    
      try {
        if (item.category === "mcp") {
          mcpBackup = { name: item.name, config: item.mcpConfig, mcpJsonPath: item.path };
        } else {
          let readPath = item.path;
          if (item.category === "skill") readPath = `${item.path}/SKILL.md`;
          const backup = await fetchJson(`/api/file-content?path=${encodeURIComponent(readPath)}`);
          if (backup.ok) backupContent = backup.content;
        }
      } catch {
        // best effort backup only
      }
    
      const response = await fetch("/api/delete", {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({
          itemPath: item.path,
          category: item.category,
          name: item.name,
        }),
      });
      const result = await response.json();
    
      if (skipRefresh) return result;
    
      if (result.ok) {
        if (selectedItem && itemKey(selectedItem) === itemKey(item)) {
          selectedItem = null;
          detailPreviewKey = null;
        }
    
        let undoFn = null;
        if (mcpBackup) {
          undoFn = async () => {
            const restoreResult = await fetch("/api/restore-mcp", {
              method: "POST",
              headers: { "Content-Type": "application/json" },
              body: JSON.stringify(mcpBackup),
            }).then((res) => res.json());
    
            if (restoreResult.ok) {
              toast("Delete undone");
              await refreshUI();
            } else {
              toast(restoreResult.error, true);
            }
          };
        } else if (backupContent) {
          undoFn = async () => {
            const restoreResult = await fetch("/api/restore", {
              method: "POST",
              headers: { "Content-Type": "application/json" },
              body: JSON.stringify({
                filePath: item.path,
                content: backupContent,
                isDir: item.category === "skill",
              }),
            }).then((res) => res.json());
    
            if (restoreResult.ok) {
              toast("Delete undone");
              await refreshUI();
            } else {
              toast(restoreResult.error, true);
            }
          };
        }
    
        toast(result.message, false, undoFn);
        await refreshUI();
      } else {
        toast(result.error, true);
      }
    
      return result;
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It adds valuable workflow context (dependency on scan_inventory) but omits safety-critical behavioral details like irreversibility of deletion, permission requirements, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero waste: first defines the operation and target, second provides the prerequisite. Front-loaded structure puts the action first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 100% schema coverage and the prerequisite guidance covering parameter sourcing, the description is functionally complete. A minor gap remains: no explicit warning about destructive/permanent effects, which is relevant for a delete operation lacking annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, establishing baseline 3. The description adds concrete category examples (memory, skill, MCP) and reinforces the relationship between parameters and scan_inventory results, helping agents understand how to populate the name and scopeId fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the specific verb 'Delete' and resource 'Claude Code configuration item', with concrete parenthetical examples (memory, skill, MCP server entry) that distinguish it from siblings like scan_inventory or move_item by action type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly prescribes the invocation prerequisite: 'Run scan_inventory first to see available items and scope IDs', naming the sibling tool directly and establishing clear workflow sequencing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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