Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes
itemIdYes

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>;
  • Registration of the removeProjectItemTool in the central ToolRegistry during built-in tools initialization.
    this.registerTool(removeProjectItemTool);
  • 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"
          }
        }
      ]
    };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HarshKumarSharma/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server