Skip to main content
Glama

delete_project

Safely remove completed or obsolete projects from your workspace by specifying the project ID and confirming the deletion. Ensures permanent cleanup of project data while preventing accidental deletions for better organization.

Instructions

Safely remove completed or obsolete projects from your workspace with built-in confirmation safeguards. Permanently cleans up project data while protecting against accidental deletions, helping maintain an organized and current project portfolio.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmYesMust be set to true to confirm deletion (safety measure)
idYesThe unique identifier of the project to delete
workingDirectoryYesThe full absolute path to the working directory where data is stored. MUST be an absolute path, never relative. Windows: "C:\Users\username\project" or "D:\projects\my-app". Unix/Linux/macOS: "/home/username/project" or "/Users/username/project". Do NOT use: ".", "..", "~", "./folder", "../folder" or any relative paths. Ensure the path exists and is accessible before calling this tool. NOTE: When server is started with --claude flag, this parameter is ignored and a global user directory is used instead.

Implementation Reference

  • The MCP tool handler function for 'delete_project' that validates input, confirms deletion, deletes the project and associated tasks/subtasks via storage, and returns formatted response.
        handler: async ({ id, confirm }: { id: string; confirm: boolean }) => {
          try {
            // Validate inputs
            if (!id || id.trim().length === 0) {
              return {
                content: [{
                  type: 'text' as const,
                  text: 'Error: Project ID is required.'
                }],
                isError: true
              };
            }
    
            if (confirm !== true) {
              return {
                content: [{
                  type: 'text' as const,
                  text: 'Error: You must set confirm to true to delete a project.'
                }],
                isError: true
              };
            }
    
            const project = await storage.getProject(id.trim());
    
            if (!project) {
              return {
                content: [{
                  type: 'text' as const,
                  text: `Error: Project with ID "${id}" not found. Use list_projects to see all available projects.`
                }],
                isError: true
              };
            }
    
            // Get counts for confirmation message
            const tasks = await storage.getTasks(project.id);
            const subtasks = await storage.getSubtasks(undefined, project.id);
    
            const deleted = await storage.deleteProject(id);
    
            if (!deleted) {
              return {
                content: [{
                  type: 'text' as const,
                  text: `Error: Failed to delete project with ID "${id}".`
                }],
                isError: true
              };
            }
    
            return {
              content: [{
                type: 'text' as const,
                text: `✅ Project deleted successfully!
    
    **Deleted:** "${project.name}" (ID: ${project.id})
    **Also deleted:** ${tasks.length} task(s) and ${subtasks.length} subtask(s)
    
    This action cannot be undone. All data associated with this project has been permanently removed.`
              }]
            };
          } catch (error) {
            return {
              content: [{
                type: 'text' as const,
                text: `Error deleting project: ${error instanceof Error ? error.message : 'Unknown error'}`
              }],
              isError: true
            };
          }
        }
  • Zod input schema for delete_project tool: requires project id (string) and confirm (boolean).
    inputSchema: {
      id: z.string(),
      confirm: z.boolean()
    },
  • FileStorage implementation of deleteProject: removes project from storage, deletes all associated tasks, saves changes.
    async deleteProject(id: string): Promise<boolean> {
      const index = this.data.projects.findIndex(p => p.id === id);
      if (index === -1) return false;
    
      this.data.projects.splice(index, 1);
      // Also delete all related tasks (including nested ones)
      await this.deleteTasksByProject(id);
      await this.save();
      return true;
    }
  • Storage interface defining deleteProject method signature.
    deleteProject(id: string): Promise<boolean>;
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: the tool is destructive ('permanently cleans up'), includes safety mechanisms ('built-in confirmation safeguards', 'protecting against accidental deletions'), and has a confirmation requirement. However, it does not mention potential side effects, error conditions, or what happens to associated data (e.g., tasks, subtasks).

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

Conciseness4/5

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

The description is appropriately sized (two sentences) and front-loaded with the core purpose. Every sentence adds value: the first states the action and safety features, the second emphasizes permanence and benefits. It could be slightly more concise by merging ideas, but it avoids waste.

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

Completeness3/5

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

Given the complexity (a destructive operation with safety mechanisms), no annotations, and no output schema, the description is moderately complete. It covers the purpose, safety, and high-level behavior but lacks details on error handling, what 'permanently cleans up' entails (e.g., data removal scope), and confirmation workflow. For a deletion tool, this leaves gaps in operational understanding.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description does not add any parameter-specific information beyond what the schema provides (e.g., it doesn't explain the 'confirm' parameter's role in the 'built-in confirmation safeguards'). Baseline 3 is appropriate when the schema does the heavy lifting.

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 clearly states the specific action ('safely remove', 'permanently cleans up') and resource ('completed or obsolete projects'), distinguishing it from sibling deletion tools like delete_memory, delete_subtask, and delete_task by specifying it operates on projects specifically. The purpose is unambiguous and well-defined.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('completed or obsolete projects', 'maintain an organized and current project portfolio'), but does not explicitly mention when not to use it or name alternative tools (e.g., update_project for modifications instead of deletion). It implies usage for cleanup but lacks explicit exclusions.

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

Related 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/Pimzino/agentic-tools-mcp'

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