remove_project_item
Remove items from GitHub projects by specifying project and item IDs to manage project boards and maintain organization.
Instructions
Remove an item from a GitHub project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | ||
| itemId | Yes |
Input Schema (JSON Schema)
{
"properties": {
"itemId": {
"type": "string"
},
"projectId": {
"type": "string"
}
},
"required": [
"projectId",
"itemId"
],
"type": "object"
}
Implementation Reference
- Core handler function implementing the remove_project_item tool logic using GitHub GraphQL API mutation 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 input parameters for the remove_project_item tool: projectId and itemId.// Schema for 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:180-180 (registration)Registration of the removeProjectItemTool in the central ToolRegistry during built-in tools initialization.this.registerTool(removeProjectItemTool);
- src/index.ts:336-337 (handler)Dispatch handler in main server that routes tool calls to the service implementation.case "remove_project_item": return await this.service.removeProjectItem(args);
- Tool definition including name, description, schema reference, and usage examples.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" } } ] };