remove_project_item
Remove specific items from GitHub projects by specifying project and item IDs to maintain organized and accurate task management.
Instructions
Remove an item from a GitHub project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | Yes | ||
| projectId | Yes |
Implementation Reference
- The core handler function that performs the GraphQL mutation to delete (remove) a project item from GitHub Projects v2 using deleteProjectV2Item.async removeProjectItem(data: { projectId: string; itemId: string; }): Promise<{ success: boolean; message: string }> { try { const mutation = ` mutation($input: DeleteProjectV2ItemInput!) { deleteProjectV2Item(input: $input) { deletedItemId } } `; interface DeleteProjectItemResponse { deleteProjectV2Item: { deletedItemId: string; }; } await this.factory.graphql<DeleteProjectItemResponse>(mutation, { input: { projectId: data.projectId, itemId: data.itemId } }); return { success: true, message: `Item ${data.itemId} has been removed from project ${data.projectId}` }; } catch (error) { throw this.mapErrorToMCPError(error); } }
- Zod schema defining the input parameters: projectId and itemId for the remove_project_item tool.export const removeProjectItemSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), itemId: z.string().min(1, "Item ID is required"), }); export type RemoveProjectItemArgs = z.infer<typeof removeProjectItemSchema>;
- src/infrastructure/tools/ToolRegistry.ts:254-254 (registration)Registration of the removeProjectItemTool in the central ToolRegistry singleton.this.registerTool(removeProjectItemTool);
- src/infrastructure/tools/ToolSchemas.ts:1583-1597 (registration)ToolDefinition export including name, description, schema reference, and example usage.export const removeProjectItemTool: ToolDefinition<RemoveProjectItemArgs> = { name: "remove_project_item", description: "Remove an item from a GitHub project", schema: removeProjectItemSchema as unknown as ToolSchema<RemoveProjectItemArgs>, examples: [ { name: "Remove item from project", description: "Remove an item from a project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7" } } ] };
- src/index.ts:409-410 (handler)Top-level dispatch in MCP server that routes tool calls to the ProjectManagementService handler.case "remove_project_item": return await this.service.removeProjectItem(args);