Skip to main content
Glama

create_project_column

Add a new column to organize tasks in GitHub projects by specifying project ID and column name.

Instructions

Create a new column for a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesThe ID of the project
nameYesThe name of the column

Implementation Reference

  • Core handler function that executes the GitHub API POST request to create a project column and parses the response with Zod.
    export async function createProjectColumn(
      github_pat: string,
      project_id: number,
      name: string
    ): Promise<z.infer<typeof ProjectColumnSchema>> {
      const response = await githubRequest(
        github_pat,
        `https://api.github.com/projects/${project_id}/columns`,
        {
          method: "POST",
          body: {
            name,
          },
          headers: {
            "Accept": "application/vnd.github.inertia-preview+json",
          },
        }
      );
      return ProjectColumnSchema.parse(response);
    }
  • Zod schemas for input validation: public schema (project_id, name) and internal schema including github_pat.
    export const CreateProjectColumnSchema = z.object({
      project_id: z.number().describe("The ID of the project"),
      name: z.string().describe("The name of the column"),
    });
    
    export const _CreateProjectColumnSchema = CreateProjectColumnSchema.extend({
      github_pat: z.string().describe("GitHub Personal Access Token"),
    });
  • src/index.ts:264-268 (registration)
    Tool registration in the MCP listTools handler, defining name, description, and input schema.
    {
      name: "create_project_column",
      description: "Create a new column for a project",
      inputSchema: zodToJsonSchema(projects.CreateProjectColumnSchema),
    },
  • MCP CallToolRequest handler case that validates arguments, invokes the core createProjectColumn function, and returns formatted response.
    case "create_project_column": {
      const args = projects._CreateProjectColumnSchema.parse(params.arguments);
      const { github_pat, project_id, name } = args;
      const result = await projects.createProjectColumn(github_pat, project_id, name);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }

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/MissionSquad/mcp-github'

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