update_project_column
Modify the name of an existing project column in GitHub by specifying its unique identifier and the desired new name.
Instructions
Update an existing project column
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| column_id | Yes | The unique identifier of the column | |
| name | Yes | New name of the column |
Implementation Reference
- operations/projects.ts:280-302 (handler)The core handler function that executes the tool logic by making a PATCH request to the GitHub API to update the project column's name.export async function updateProjectColumn(columnId: number, name: string) { try { const url = `https://api.github.com/projects/columns/${columnId}`; const response = await githubRequest(url, { method: 'PATCH', body: { name: name }, headers: { 'Accept': 'application/vnd.github.inertia-preview+json' } }); return response; } catch (error) { if (error instanceof GitHubError) { throw error; } throw new GitHubError(`Failed to update project column: ${(error as Error).message}`, 500, { error: (error as Error).message }); } }
- operations/projects.ts:53-56 (schema)Zod schema defining the input parameters for the update_project_column tool: column_id (number) and name (string).export const UpdateProjectColumnSchema = z.object({ column_id: z.number().describe("The unique identifier of the column"), name: z.string().describe("New name of the column"), });
- index.ts:236-239 (registration)Tool registration in the ListTools response, defining the tool's name, description, and input schema.name: "update_project_column", description: "Update an existing project column", inputSchema: zodToJsonSchema(projects.UpdateProjectColumnSchema), },
- index.ts:655-664 (registration)Dispatch handler in the switch statement that parses arguments, calls the projects.updateProjectColumn function, and returns the result.case "update_project_column": { const args = projects.UpdateProjectColumnSchema.parse(request.params.arguments); const result = await projects.updateProjectColumn( args.column_id, args.name ); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }