Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

archive_project_item

Archive items in GitHub projects to hide them from views without deletion. Use this tool to clean up project boards while preserving item history.

Instructions

Archive an item in a GitHub project. Archived items are hidden from views but not deleted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes
itemIdYes

Implementation Reference

  • Core handler function that executes the archive_project_item tool by calling GitHub's GraphQL API mutation 'archiveProjectV2Item' to archive the specified project item.
    async archiveProjectItem(data: {
      projectId: string;
      itemId: string;
    }): Promise<{ success: boolean; message: string }> {
      try {
        const mutation = `
          mutation($input: ArchiveProjectV2ItemInput!) {
            archiveProjectV2Item(input: $input) {
              item {
                id
                isArchived
              }
            }
          }
        `;
    
        interface ArchiveProjectItemResponse {
          archiveProjectV2Item: {
            item: {
              id: string;
              isArchived: boolean;
            };
          };
        }
    
        await this.factory.graphql<ArchiveProjectItemResponse>(mutation, {
          input: {
            projectId: data.projectId,
            itemId: data.itemId
          }
        });
    
        return {
          success: true,
          message: `Item ${data.itemId} has been archived in project ${data.projectId}`
        };
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • ToolDefinition object defining the tool name, description, input schema (archiveProjectItemSchema), and usage examples.
    export const archiveProjectItemTool: ToolDefinition<ArchiveProjectItemArgs> = {
      name: "archive_project_item",
      description: "Archive an item in a GitHub project. Archived items are hidden from views but not deleted.",
      schema: archiveProjectItemSchema as unknown as ToolSchema<ArchiveProjectItemArgs>,
      examples: [
        {
          name: "Archive completed task",
          description: "Archive a project item that is complete",
          args: {
            projectId: "PVT_kwDOLhQ7gc4AOEbH",
            itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7"
          }
        }
      ]
    };
  • Zod input validation schema requiring projectId and itemId strings.
    export const archiveProjectItemSchema = z.object({
      projectId: z.string().min(1, "Project ID is required"),
      itemId: z.string().min(1, "Item ID is required"),
    });
    
    export type ArchiveProjectItemArgs = z.infer<typeof archiveProjectItemSchema>;
  • Registers the archiveProjectItemTool in the central ToolRegistry singleton instance.
    this.registerTool(archiveProjectItemTool);
    this.registerTool(unarchiveProjectItemTool);
  • MCP tool dispatcher switch case that routes 'archive_project_item' calls to the ProjectManagementService handler.
    case "archive_project_item":
      return await this.service.archiveProjectItem(args);
Install Server

Other Tools

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/kunwarVivek/mcp-github-project-manager'

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