Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

create_project_view

Create a new view for a GitHub project to organize tasks using board, table, timeline, or roadmap layouts.

Instructions

Create a new view for a GitHub project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes
nameYes
layoutYes

Implementation Reference

  • Core handler: Executes GraphQL mutation `createProjectV2View` to create a new GitHub Projects v2 view with specified name and layout.
    async createView(projectId: ProjectId, name: string, layout: ProjectView["layout"]): Promise<ProjectView> {
      const mutation = `
        mutation($input: CreateProjectV2ViewInput!) {
          createProjectV2View(input: $input) {
            projectV2View {
              id
              name
              layout
            }
          }
        }
      `;
    
      try {
        const graphqlLayout = mapToGraphQLViewLayout(layout);
    
        const variables = {
          input: {
            projectId,
            name,
            layout: graphqlLayout
          }
        };
    
        const response = await this.graphql<CreateProjectV2ViewResponse>(mutation, variables);
    
        if (!response.createProjectV2View?.projectV2View) {
          throw new Error('Failed to create project view: Invalid response from GitHub API');
        }
    
        const view = response.createProjectV2View.projectV2View;
    
        return {
          id: view.id,
          name: view.name,
          layout: view.layout.toLowerCase() as ViewLayout,
          fields: [],
          sortBy: [],
          groupBy: undefined,
          filters: []
        };
      } catch (error) {
        this.logger.error(`Failed to create project view for project ${projectId}`, error);
        throw this.handleGraphQLError(error);
      }
  • Service layer handler: Validates input and delegates to GitHubProjectRepository.createView
    async createProjectView(data: {
      projectId: string;
      name: string;
      layout: 'board' | 'table' | 'timeline' | 'roadmap';
    }): Promise<ProjectView> {
      try {
        return await this.projectRepo.createView(
          data.projectId,
          data.name,
          data.layout
        );
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • MCP tool dispatcher: Routes 'create_project_view' tool calls to ProjectManagementService.createProjectView
    case "create_project_view":
      return await this.service.createProjectView(args);
  • Tool definition including Zod input schema (projectId, name, layout), description, and examples
    export const createProjectViewTool: ToolDefinition<CreateProjectViewArgs> = {
      name: "create_project_view",
      description: "Create a new view for a GitHub project",
      schema: createProjectViewSchema as unknown as ToolSchema<CreateProjectViewArgs>,
      examples: [
        {
          name: "Create kanban board view",
          description: "Create a board view for a project",
          args: {
            projectId: "PVT_kwDOLhQ7gc4AOEbH",
            name: "Development Board",
            layout: "board"
          }
        }
      ]
    };
  • Registers createProjectViewTool in the central ToolRegistry singleton (imported from ToolSchemas.ts line 44)
    this.registerTool(createProjectViewTool);
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