Skip to main content
Glama

list_project_fields

Retrieve all fields within a GitHub project to manage custom attributes, track tasks, and organize workflows effectively using GitHub Projects V2 integration.

Instructions

List all fields in a GitHub project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes

Implementation Reference

  • The main handler function that retrieves and returns the list of custom fields for a given GitHub project ID by fetching the project via repository and extracting its fields array.
    async listProjectFields(data: { projectId: string; }): Promise<CustomField[]> { try { const project = await this.projectRepo.findById(data.projectId); if (!project) { throw new ResourceNotFoundError(ResourceType.PROJECT, data.projectId); } return project.fields || []; } catch (error) { throw this.mapErrorToMCPError(error); } }
  • Tool definition including name, description, input schema (requiring projectId), and example usage for listing project fields.
    export const listProjectFieldsTool: ToolDefinition<ListProjectFieldsArgs> = { name: "list_project_fields", description: "List all fields in a GitHub project", schema: listProjectFieldsSchema as unknown as ToolSchema<ListProjectFieldsArgs>, examples: [ { name: "List project fields", description: "Get all fields for a specific project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH" } } ] };
  • Registers the listProjectFieldsTool in the central ToolRegistry singleton during built-in tools initialization.
    this.registerTool(listProjectFieldsTool);
  • MCP tool dispatch handler that routes 'list_project_fields' calls to the ProjectManagementService.listProjectFields method.
    case "list_project_fields": return await this.service.listProjectFields(args);

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