Skip to main content
Glama

add_card_to_column

Add a card containing an issue, pull request, or note to a specific project column in a GitHub repository. Specify the owner, repo, column ID, and content type for precise placement.

Instructions

Add a new card to a project column

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
column_idYesThe ID of the column to add card to
content_idNoID of the issue or pull request (required if content_type is Issue or PullRequest)
content_typeYesType of content for the card
noteNoThe note content for the card (required if content_type is Note)
ownerYesRepository owner (username or organization)
repoYesRepository name

Implementation Reference

  • Core implementation of the add_card_to_column tool: validates inputs, constructs payload, and makes POST request to GitHub API to add card to column.
    export async function addCardToColumn(
        owner: string,
        repo: string,
        columnId: string,
        contentType: string,
        contentId?: number,
        note?: string
    ) {
        try {
            const payload: any = {};
    
            if (contentType === 'Note') {
                if (!note) {
                    throw new GitHubError('Note content is required when content_type is Note', 400, { message: 'Missing note content' });
                }
                payload.note = note;
            } else {
                if (!contentId) {
                    throw new GitHubError('Content ID is required when content_type is Issue or PullRequest', 400, { message: 'Missing content ID' });
                }
    
                const actualContentType = contentType.toLowerCase();
                payload.content_id = contentId;
                payload.content_type = actualContentType;
            }
    
            const url = `https://api.github.com/projects/columns/${columnId}/cards`;
    
            const response = await githubRequest(url, {
                method: 'POST',
                body: payload,
                headers: {
                    'Accept': 'application/vnd.github.inertia-preview+json'
                }
            });
    
            return response;
        } catch (error) {
            if (error instanceof GitHubError) {
                throw error;
            }
    
            throw new GitHubError(`Failed to add card to column: ${(error as Error).message}`, 500, { error: (error as Error).message });
        }
    }
  • Zod schema defining input parameters for the add_card_to_column tool.
    export const AddCardToColumnSchema = z.object({
        owner: z.string().describe("Repository owner (username or organization)"),
        repo: z.string().describe("Repository name"),
        column_id: z.string().describe("The ID of the column to add card to"),
        content_type: z.enum(["Issue", "PullRequest", "Note"]).describe("Type of content for the card"),
        content_id: z.number().optional().describe("ID of the issue or pull request (required if content_type is Issue or PullRequest)"),
        note: z.string().optional().describe("The note content for the card (required if content_type is Note)"),
    });
  • index.ts:246-249 (registration)
    Registers the add_card_to_column tool in the MCP server tool list, including name, description, and input schema.
      name: "add_card_to_column",
      description: "Add a new card to a project column",
      inputSchema: zodToJsonSchema(projects.AddCardToColumnSchema),
    },
  • Top-level handler case in the MCP tool dispatcher that parses arguments and delegates to the projects.addCardToColumn implementation.
    case "add_card_to_column": {
      const args = projects.AddCardToColumnSchema.parse(request.params.arguments);
      const result = await projects.addCardToColumn(
        args.owner,
        args.repo,
        args.column_id,
        args.content_type,
        args.content_id,
        args.note
      );
      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. 'Add' implies a write/mutation operation, but the description doesn't mention required permissions, whether this creates a permanent record, potential side effects, error conditions, or what happens if the column doesn't exist. This is inadequate for a mutation tool with zero annotation coverage.

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 purpose without unnecessary words. It's appropriately sized for a tool with good schema documentation and gets straight to the point.

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 mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'adding a card' means operationally, what the tool returns, error conditions, or how it differs from similar sibling tools. The 100% schema coverage helps with parameters but doesn't compensate for missing behavioral context.

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 6 parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema (like explaining relationships between content_type and other parameters). Baseline 3 is appropriate when the 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 action ('Add a new card') and target resource ('to a project column'), providing specific verb+resource. However, it doesn't distinguish this tool from sibling tools like 'add_item_to_project_v2' or 'move_card', which also manipulate project cards/items.

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 like 'add_item_to_project_v2' or 'create_project_column'. It doesn't mention prerequisites, constraints, or typical use cases, leaving the agent to infer usage from the tool name alone.

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