Skip to main content
Glama

list_project_columns

Retrieve and organize project columns by providing a project ID from GitHub. Specify pagination parameters to manage large datasets effectively.

Instructions

List columns for a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number of the results
per_pageNoResults per page (max 100)
project_idYesThe ID of the project

Implementation Reference

  • The main handler function that executes the logic to list project columns via GitHub API, parsing input and returning validated columns.
    export async function listProjectColumns( github_pat: string, project_id: number, options: { per_page?: number; page?: number; } = {} ): Promise<z.infer<typeof ProjectColumnSchema>[]> { const url = new URL(`https://api.github.com/projects/${project_id}/columns`); if (options.per_page) url.searchParams.append("per_page", options.per_page.toString()); if (options.page) url.searchParams.append("page", options.page.toString()); const response = await githubRequest( github_pat, url.toString(), { headers: { "Accept": "application/vnd.github.inertia-preview+json", }, } ); return z.array(ProjectColumnSchema).parse(response); }
  • Input schema definitions: ListProjectColumnsSchema (public input) and _ListProjectColumnsSchema (internal with PAT). Used for validation.
    export const ListProjectColumnsSchema = z.object({ project_id: z.number().describe("The ID of the project"), per_page: z.number().optional().describe("Results per page (max 100)"), page: z.number().optional().describe("Page number of the results"), }); export const _ListProjectColumnsSchema = ListProjectColumnsSchema.extend({ github_pat: z.string().describe("GitHub Personal Access Token"), });
  • src/index.ts:260-262 (registration)
    Tool registration in listTools handler: declares the tool name, description, and input schema.
    name: "list_project_columns", description: "List columns for a project", inputSchema: zodToJsonSchema(projects.ListProjectColumnsSchema),
  • src/index.ts:703-710 (registration)
    Tool dispatch in callTool handler: parses arguments with internal schema and invokes the handler function.
    case "list_project_columns": { const args = projects._ListProjectColumnsSchema.parse(params.arguments); const { github_pat, project_id, ...options } = args; const result = await projects.listProjectColumns(github_pat, project_id, options); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }

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/MissionSquad/mcp-github'

If you have feedback or need assistance with the MCP directory API, please join our Discord server