Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

create_draft_issue

Create draft issues directly in GitHub Projects v2 without needing repository issues first. Use this tool to add tasks with titles, descriptions, and assignees to project boards.

Instructions

Create a draft issue in a GitHub project. Draft issues are native to Projects v2 and don't require creating a repository issue first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes
titleYes
bodyNo
assigneeIdsNo

Implementation Reference

  • Implements the core logic for creating a draft issue in a GitHub project using GraphQL mutation addProjectV2DraftIssue. Handles input validation, API call, and error mapping.
    async createDraftIssue(data: {
      projectId: string;
      title: string;
      body?: string;
      assigneeIds?: string[];
    }): Promise<{ id: string; title: string; body: string }> {
      try {
        const mutation = `
          mutation($input: AddProjectV2DraftIssueInput!) {
            addProjectV2DraftIssue(input: $input) {
              projectV2Item {
                id
                content {
                  ... on DraftIssue {
                    id
                    title
                    body
                  }
                }
              }
            }
          }
        `;
    
        interface AddDraftIssueResponse {
          addProjectV2DraftIssue: {
            projectV2Item: {
              id: string;
              content: {
                id: string;
                title: string;
                body: string;
              };
            };
          };
        }
    
        const response = await this.factory.graphql<AddDraftIssueResponse>(mutation, {
          input: {
            projectId: data.projectId,
            title: data.title,
            body: data.body || '',
            assigneeIds: data.assigneeIds || []
          }
        });
    
        const content = response.addProjectV2DraftIssue.projectV2Item.content;
    
        return {
          id: content.id,
          title: content.title,
          body: content.body
        };
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • Defines the ToolDefinition for create_draft_issue including Zod input schema, description, and usage examples.
    export const createDraftIssueTool: ToolDefinition<CreateDraftIssueArgs> = {
      name: "create_draft_issue",
      description: "Create a draft issue in a GitHub project. Draft issues are native to Projects v2 and don't require creating a repository issue first.",
      schema: createDraftIssueSchema as unknown as ToolSchema<CreateDraftIssueArgs>,
      examples: [
        {
          name: "Create draft task",
          description: "Create a draft issue for brainstorming without committing to the repository",
          args: {
            projectId: "PVT_kwDOLhQ7gc4AOEbH",
            title: "Explore new authentication options",
            body: "Research OAuth providers and compare features"
          }
        }
      ]
    };
  • Registers the createDraftIssueTool (and related draft tools) in the central ToolRegistry singleton.
    // Register draft issue tools
    this.registerTool(createDraftIssueTool);
    this.registerTool(updateDraftIssueTool);
    this.registerTool(deleteDraftIssueTool);
  • src/index.ts:333-334 (registration)
    Dispatches tool calls to the ProjectManagementService.createDraftIssue handler in the MCP server switch statement.
    case "create_draft_issue":
      return await this.service.createDraftIssue(args);
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. While it explains what draft issues are (native to Projects v2, no repository issue needed), it doesn't mention permissions required, whether this is a write operation (implied by 'Create' but not explicit), rate limits, or what happens on success/failure. For a creation tool with zero annotation coverage, this leaves significant behavioral gaps.

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?

Two clear, efficient sentences with zero waste. The first sentence states the core purpose, the second provides important contextual differentiation. Every word earns its place and the information is front-loaded appropriately.

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 creation tool with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. While it explains the 'what' and provides some GitHub-specific context about Projects v2, it lacks crucial information about parameters, permissions, behavioral outcomes, and what the tool returns upon success.

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

Parameters2/5

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

With 0% schema description coverage and 4 parameters (2 required), the description provides no information about any parameters. It doesn't explain what 'projectId' refers to, what format 'title' and 'body' should use, what 'assigneeIds' represent, or any constraints. The description fails to compensate for the complete lack of schema documentation.

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

Purpose5/5

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

The description clearly states the specific action ('Create a draft issue') and resource ('in a GitHub project'), with explicit differentiation from repository issues ('native to Projects v2 and don't require creating a repository issue first'). This distinguishes it from sibling tools like 'create_issue' which likely creates repository issues.

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

Usage Guidelines4/5

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

The description provides clear context about when to use this tool (for Projects v2 draft issues) by contrasting it with repository issues, which helps differentiate it from 'create_issue'. However, it doesn't explicitly mention when NOT to use it or provide alternatives beyond the implied contrast.

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

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/kunwarVivek/mcp-github-project-manager'

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