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
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project identifier |
Implementation Reference
- src/index.ts:131-149 (handler)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}`); } }
- src/index.ts:314-320 (schema)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" }] };