list_project_fields
Retrieve all custom fields from a GitHub project to view available data points for task organization and filtering.
Instructions
List all fields in a GitHub project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes |
Implementation Reference
- The core handler function that fetches and returns the custom fields for a given GitHub project ID by querying the project repository.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 input schema (requires projectId), description, and example usage.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" } } ] };
- src/infrastructure/tools/ToolRegistry.ts:243-243 (registration)Registers the listProjectFieldsTool in the central tool registry during initialization.this.registerTool(listProjectFieldsTool);
- src/index.ts:280-281 (handler)MCP server dispatcher that routes tool calls to the ProjectManagementService handler.case "list_project_fields": return await this.service.listProjectFields(args);