delete_project
Remove a GitHub project by specifying its project ID using the 'delete_project' tool on the mcp-github-project-manager server, ensuring clean project management.
Instructions
Delete a GitHub project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes |
Implementation Reference
- The main handler function that executes the delete project logic by delegating to the GitHubProjectRepository.async deleteProject(data: { projectId: string; }): Promise<{ success: boolean; message: string }> { try { await this.projectRepo.delete(data.projectId); return { success: true, message: `Project ${data.projectId} has been deleted`, }; } catch (error) { throw this.mapErrorToMCPError(error); } }
- Low-level repository method that performs the actual GraphQL mutation to delete the GitHub ProjectV2.async delete(id: ProjectId): Promise<void> { const mutation = ` mutation($input: DeleteProjectV2Input!) { deleteProjectV2(input: $input) { projectV2 { id } } } `; await this.graphql(mutation, { input: { projectId: id, }, }); }
- Tool definition with input schema (projectId: string), description, and example usage.export const deleteProjectTool: ToolDefinition<DeleteProjectArgs> = { name: "delete_project", description: "Delete a GitHub project", schema: deleteProjectSchema as unknown as ToolSchema<DeleteProjectArgs>, examples: [ { name: "Delete project", description: "Delete a GitHub project by ID", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH" } } ] };
- src/infrastructure/tools/ToolRegistry.ts:197-197 (registration)Registers the deleteProjectTool in the central ToolRegistry singleton.this.registerTool(deleteProjectTool);
- src/index.ts:271-272 (handler)MCP server request handler that dispatches 'delete_project' tool calls to the ProjectManagementService.case "delete_project": return await this.service.deleteProject(args);