Skip to main content
Glama

list_column_cards

Retrieve all cards in a GitHub project column by specifying the column ID, with options to filter by archived state and paginate results for efficient project management.

Instructions

List all cards in a project column

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
archived_stateNoFilter by card archived state
column_idYesThe unique identifier of the column
pageNoPage number for pagination (starts at 1)
per_pageNoNumber of results per page (max 100)

Implementation Reference

  • Core implementation of the list_column_cards tool: fetches cards from a GitHub project column using the GitHub API, with support for archived_state, pagination.
    export async function listColumnCards(columnId: number, archivedState?: string, page?: number, perPage?: number) {
        try {
            const params: Record<string, string | number | undefined> = {};
    
            if (archivedState) {
                params.archived_state = archivedState;
            }
    
            if (page) {
                params.page = page;
            }
    
            if (perPage) {
                params.per_page = perPage;
            }
    
            let url = `https://api.github.com/projects/columns/${columnId}/cards`;
    
            // 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 column cards: ${(error as Error).message}`, 500, { error: (error as Error).message });
        }
    }
  • Input schema (Zod) for validating parameters of the list_column_cards tool.
    export const ListColumnCardsSchema = z.object({
        column_id: z.number().describe("The unique identifier of the column"),
        archived_state: z.enum(["all", "archived", "not_archived"]).optional().describe("Filter by card archived state"),
        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:251-254 (registration)
    Registration of the list_column_cards tool in the MCP server's list of tools, including name, description, and input schema reference.
      name: "list_column_cards",
      description: "List all cards in a project column",
      inputSchema: zodToJsonSchema(projects.ListColumnCardsSchema),
    },
  • MCP protocol handler for list_column_cards: parses input arguments using the schema and delegates to the core listColumnCards implementation.
    case "list_column_cards": {
      const args = projects.ListColumnCardsSchema.parse(request.params.arguments);
      const result = await projects.listColumnCards(
        args.column_id,
        args.archived_state,
        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?

With no annotations provided, the description carries full burden for behavioral disclosure. It states it's a list operation but doesn't mention pagination behavior (implied by parameters but not described), rate limits, authentication requirements, or what happens with archived cards. The description is minimal and doesn't provide adequate behavioral context for a tool with filtering and pagination capabilities.

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 that states the core functionality without any wasted words. It's appropriately sized for a list operation and front-loads the essential information.

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?

For a tool with 4 parameters (including filtering and pagination), no annotations, and no output schema, the description is insufficient. It doesn't explain the return format, how archived cards are handled, pagination behavior, or error conditions. The minimal description leaves significant gaps in understanding how to effectively use this tool.

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 already documents all parameters thoroughly. The description doesn't add any parameter semantics beyond what's in the schema - it mentions 'project column' which relates to 'column_id' but provides no additional context about column identification or the relationship between columns and cards.

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 action ('List all cards') and target resource ('in a project column'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'list_project_v2_items' or 'list_project_columns' which might have overlapping functionality in the same domain.

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 are multiple list/search tools in the sibling set (list_issues, list_project_columns, list_project_v2_items, search_issues, etc.), but no indication of which scenarios call for this specific column-card listing tool.

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