Skip to main content
Glama

update_project_field

Modify custom fields in GitHub projects, including updating names, descriptions, options, and required status, to streamline project management workflows.

Instructions

Update a custom field in a GitHub project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNo
fieldIdYes
nameNo
optionsNo
projectIdYes
requiredNo

Implementation Reference

  • The main handler function that executes the tool logic. Prepares the update data from input arguments and delegates to the GitHubProjectRepository to perform the actual API update.
    async updateProjectField(data: { projectId: string; fieldId: string; name?: string; options?: Array<{ name: string; color?: string; }>; }): Promise<CustomField> { try { const updateData: Partial<CustomField> = {}; if (data.name !== undefined) { updateData.name = data.name; } if (data.options !== undefined) { updateData.options = data.options.map(option => ({ id: '', // This will be assigned by GitHub name: option.name, color: option.color })); } return await this.projectRepo.updateField(data.projectId, data.fieldId, updateData); } catch (error) { throw this.mapErrorToMCPError(error); } }
  • Zod schema defining the input validation for the update_project_field tool.
    // Schema for update_project_field tool export const updateProjectFieldSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), fieldId: z.string().min(1, "Field ID is required"), name: z.string().optional(), description: z.string().optional(), options: z.array( z.object({ id: z.string().optional(), name: z.string().min(1), description: z.string().optional(), color: z.string().optional(), }) ).optional(), required: z.boolean().optional(), }); export type UpdateProjectFieldArgs = z.infer<typeof updateProjectFieldSchema>;
  • Registers the updateProjectFieldTool in the central tool registry during initialization.
    this.registerTool(updateProjectFieldTool);
  • ToolDefinition object that includes name, description, schema reference, and usage examples for the tool.
    export const updateProjectFieldTool: ToolDefinition<UpdateProjectFieldArgs> = { name: "update_project_field", description: "Update a custom field in a GitHub project", schema: updateProjectFieldSchema as unknown as ToolSchema<UpdateProjectFieldArgs>, examples: [ { name: "Update field options", description: "Update options for a single-select field", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI1", name: "Updated Status", options: [ { name: "Not Started", color: "red" }, { name: "In Progress", color: "yellow" }, { name: "Review", color: "blue" }, { name: "Complete", color: "green" } ] } } ] };
  • Import of the updateProjectFieldTool from ToolSchemas.ts for registration.
    updateProjectFieldTool,

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