delete_project
Remove a project and its associated data from the Project Handoffs MCP Server to manage AI session handoffs and streamline workflow organization.
Instructions
Delete a project and all its data
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project identifier |
Input Schema (JSON Schema)
{
"properties": {
"projectId": {
"description": "Project identifier",
"type": "string"
}
},
"required": [
"projectId"
],
"type": "object"
}
Implementation Reference
- src/index.ts:131-149 (handler)Core handler function that executes the delete_project tool logic by removing the project from metadata and deleting its associated 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:311-321 (registration)Registration of the delete_project tool in the list of available tools, including 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 (handler)MCP server handler that dispatches delete_project tool calls to the ProjectManager and returns a success response.case "delete_project": await projectManager.deleteProject(args.projectId as string); return { content: [{ type: "text", text: "Project deleted successfully" }] };