Skip to main content
Glama

list_project_columns

Retrieve all columns in a specified GitHub project with pagination support. Use this tool to organize and manage project tasks effectively by viewing column structures.

Instructions

List all columns in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number for pagination (starts at 1)
per_pageNoNumber of results per page (max 100)
project_idYesThe unique identifier of the project

Implementation Reference

  • The core handler function that executes the tool logic by calling the GitHub API to list columns for a given project ID with optional pagination.
    export async function listProjectColumns(projectId: number, page?: number, perPage?: number) {
        try {
            const params: Record<string, string | number | undefined> = {};
    
            if (page) {
                params.page = page;
            }
    
            if (perPage) {
                params.per_page = perPage;
            }
    
            let url = `https://api.github.com/projects/${projectId}/columns`;
    
            // Thêm query params nếu có
            if (Object.keys(params).length > 0) {
                const queryString = new URLSearchParams();
                Object.entries(params).forEach(([key, value]) => {
                    if (value !== undefined) {
                        queryString.append(key, String(value));
                    }
                });
                url += `?${queryString.toString()}`;
            }
    
            return await githubRequest(url, {
                headers: {
                    'Accept': 'application/vnd.github.inertia-preview+json'
                }
            });
        } catch (error) {
            if (error instanceof GitHubError) {
                throw error;
            }
    
            throw new GitHubError(`Failed to list project columns: ${(error as Error).message}`, 500, { error: (error as Error).message });
        }
    }
  • Zod schema defining the input parameters (project_id, optional page, per_page) for the list_project_columns tool.
    export const ListProjectColumnsSchema = z.object({
        project_id: z.number().describe("The unique identifier of the project"),
        page: z.number().optional().describe("Page number for pagination (starts at 1)"),
        per_page: z.number().optional().describe("Number of results per page (max 100)"),
    });
  • index.ts:231-234 (registration)
    Tool registration in the list of available tools returned by ListToolsRequest.
      name: "list_project_columns",
      description: "List all columns in a project",
      inputSchema: zodToJsonSchema(projects.ListProjectColumnsSchema),
    },
  • Dispatcher case in the main CallToolRequest handler that parses arguments and delegates to the projects.listProjectColumns function.
    case "list_project_columns": {
      const args = projects.ListProjectColumnsSchema.parse(request.params.arguments);
      const result = await projects.listProjectColumns(
        args.project_id,
        args.page,
        args.per_page
      );
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states it 'List all columns' but doesn't disclose behavioral traits like pagination behavior (implied by parameters but not described), rate limits, authentication needs, or what 'all' means in context. The description is minimal and lacks necessary operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a simple list operation and front-loaded with the core purpose, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a simple but operational tool (list with pagination), the description is incomplete. It doesn't cover behavioral aspects like pagination, return format, or error conditions, leaving gaps that could hinder correct agent invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents the three parameters (project_id, page, per_page). The description adds no additional meaning beyond the schema, such as explaining relationships between parameters or usage nuances. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('columns in a project'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list_column_cards' or 'list_projects', which would require specifying it's about project columns specifically (not cards or projects themselves).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites (like needing a project_id), when not to use it, or how it differs from related sibling tools such as 'list_column_cards' or 'get_project'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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

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