Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

create_issue

Create a new GitHub issue with title, description, assignees, and labels to track tasks, bugs, or features in your project workflow.

Instructions

Create a new GitHub issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
descriptionYes
milestoneIdNo
assigneesYes
labelsYes
priorityNo
typeNo

Implementation Reference

  • Core handler that executes the GitHub GraphQL mutation to create an issue with title, body (description), assignees, labels, and milestone.
    async create(data: CreateIssue): Promise<Issue> {
      const mutation = `
        mutation($input: CreateIssueInput!) {
          createIssue(input: $input) {
            issue {
              id
              number
              title
              body
              state
              createdAt
              updatedAt
              assignees(first: 100) {
                nodes {
                  login
                }
              }
              labels(first: 100) {
                nodes {
                  name
                }
              }
              milestone {
                id
              }
            }
          }
        }
      `;
    
      const response = await this.graphql<CreateIssueResponse>(mutation, {
        input: {
          repositoryId: this.repo,
          title: data.title,
          body: data.description,
          assigneeIds: data.assignees,
          labelIds: data.labels,
          milestoneId: data.milestoneId,
        },
      });
    
      return this.mapGitHubIssueToIssue(response.createIssue.issue);
    }
  • Service layer handler that processes tool arguments, enriches labels with priority/type, and delegates to GitHubIssueRepository.
    async createIssue(data: {
      title: string;
      description: string;
      milestoneId?: string;
      assignees?: string[];
      labels?: string[];
      priority?: string;
      type?: string;
    }): Promise<Issue> {
      try {
        // Create labels based on priority and type if provided
        const labels = data.labels || [];
        if (data.priority) {
          labels.push(`priority:${data.priority}`);
        }
        if (data.type) {
          labels.push(`type:${data.type}`);
        }
    
        const issueData: CreateIssue = {
          title: data.title,
          description: data.description,
          assignees: data.assignees || [],
          labels,
          milestoneId: data.milestoneId,
        };
    
        return await this.issueRepo.create(issueData);
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • ToolDefinition for 'create_issue' including Zod input schema reference, description, and usage examples.
    export const createIssueTool: ToolDefinition<CreateIssueArgs> = {
      name: "create_issue",
      description: "Create a new GitHub issue",
      schema: createIssueSchema as unknown as ToolSchema<CreateIssueArgs>,
      examples: [
        {
          name: "Create bug issue",
          description: "Create a bug issue with high priority",
          args: {
            title: "Fix authentication bug",
            description: "Users cannot log in with social media accounts",
            priority: "high",
            type: "bug",
            assignees: ["developer1"],
            labels: ["bug", "authentication"]
          }
        }
      ]
    };
  • Registers the createIssueTool in the central ToolRegistry singleton used by MCP server.
    this.registerTool(createIssueTool);
    this.registerTool(listIssuesTool);
    this.registerTool(getIssueTool);
    this.registerTool(updateIssueTool);
  • Zod schema defining input validation for create_issue tool parameters.
    export const createIssueSchema = z.object({
      title: z.string().min(1, "Issue title is required"),
      description: z.string().min(1, "Issue description is required"),
      milestoneId: z.string().optional(),
      assignees: z.array(z.string()).default([]),
      labels: z.array(z.string()).default([]),
      priority: z.enum(["high", "medium", "low"]).default("medium").optional(),
      type: z.enum(["bug", "feature", "enhancement", "documentation"]).default("feature").optional(),
    });
    
    export type CreateIssueArgs = z.infer<typeof createIssueSchema>;
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Create' implies a write operation, it lacks details on permissions required, rate limits, side effects, or what happens on success/failure. 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 with zero wasted words. It's front-loaded and immediately communicates the core purpose without unnecessary elaboration, 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?

For a tool with 7 parameters, 4 required, no annotations, no output schema, and 0% schema coverage, the description is severely incomplete. It doesn't explain parameter usage, behavioral traits, or output expectations, leaving critical gaps for the agent to operate effectively.

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?

Schema description coverage is 0%, meaning none of the 7 parameters are documented in the schema. The description adds no information about parameters like 'title,' 'description,' or 'milestoneId,' failing to compensate for the schema gap. This leaves the agent guessing about parameter meanings and formats.

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 'Create a new GitHub issue' clearly states the action (create) and resource (GitHub issue), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'create_draft_issue' or 'create_project_item,' which would require explicit comparison to achieve a perfect score.

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. With many sibling tools like 'create_draft_issue' and 'create_project_item' available, there's no indication of prerequisites, differences, or specific contexts for choosing this tool over others.

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