Skip to main content
Glama
davidorex

Project Handoffs MCP Server

by davidorex

delete_project

Remove a project and all associated data from the Project Handoffs MCP Server to manage workflow organization and maintain clean project tracking.

Instructions

Delete a project and all its data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject identifier

Implementation Reference

  • The `deleteProject` method in the `ProjectManager` class implements the core deletion logic: loads project metadata, removes the project entry, saves the updated metadata, and deletes the associated project data file.
    async deleteProject(projectId: string): Promise<void> {
      const projects = await this.loadMetadata();
      const projectIndex = projects.findIndex(p => p.id === projectId);
      
      if (projectIndex === -1) {
        throw new ProjectError('Project not found', projectId);
      }
    
      // Remove project metadata
      projects.splice(projectIndex, 1);
      await this.saveMetadata(projects);
    
      // Delete project data file
      try {
        await fs.unlink(path.join(BASE_STORAGE_DIR, `${projectId}.json`));
      } catch (error) {
        console.error(`Failed to delete project data file: ${error}`);
      }
    }
  • Input schema definition for the `delete_project` tool, specifying the required `projectId` parameter.
    inputSchema: {
      type: "object",
      properties: {
        projectId: { type: "string", description: "Project identifier" }
      },
      required: ["projectId"]
    }
  • src/index.ts:311-321 (registration)
    Registration of the `delete_project` tool in the `ListToolsRequestSchema` handler, providing name, description, and input schema.
    {
      name: "delete_project",
      description: "Delete a project and all its data",
      inputSchema: {
        type: "object",
        properties: {
          projectId: { type: "string", description: "Project identifier" }
        },
        required: ["projectId"]
      }
    },
  • src/index.ts:439-446 (registration)
    Tool call dispatcher in the `CallToolRequestSchema` handler that invokes the `deleteProject` method and returns success response.
    case "delete_project":
      await projectManager.deleteProject(args.projectId as string);
      return {
        content: [{
          type: "text",
          text: "Project deleted successfully"
        }]
      };

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/davidorex/project-handoffs'

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