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
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The ID of the project | |
| name | Yes | The name of the column |
Implementation Reference
- src/operations/projects.ts:178-197 (handler)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); }
- src/operations/projects.ts:82-89 (schema)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), },
- src/index.ts:712-719 (handler)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) }], }; }