Skip to main content
Glama

create_issue

Create new GitHub issues to track tasks, bugs, or features with assignees, labels, and descriptions for project management.

Instructions

Create a new GitHub issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
descriptionYes
milestoneIdNo
assigneesYes
labelsYes
priorityNo
typeNo

Implementation Reference

  • Core handler function that executes the create_issue tool logic: processes args, generates labels from priority/type, creates CreateIssue object, and calls GitHubIssueRepository.create to make the API call.
    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);
      }
    }
  • Zod schema definition for validating input arguments to the create_issue tool, including title, description, milestone, assignees, labels, priority, and type.
    // Schema for create_issue tool
    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>;
  • Registers the createIssueTool (imported from ToolSchemas) in the central ToolRegistry singleton.
    // Register issue tools
    this.registerTool(createIssueTool);
    this.registerTool(listIssuesTool);
    this.registerTool(getIssueTool);
    this.registerTool(updateIssueTool);
  • MCP tool dispatch handler in executeToolHandler switch statement that routes create_issue calls to ProjectManagementService.createIssue.
    case "create_issue":
      return await this.service.createIssue(args);
  • ToolDefinition object for create_issue, including name, description, schema reference, 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"]
          }
        }
      ]
    };
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. 'Create a new GitHub issue' implies a write operation, but it doesn't disclose any behavioral traits such as required permissions, rate limits, whether it's idempotent, what happens on failure, or the format of the response. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 waste. It's front-loaded with the core action ('Create a new GitHub issue'), making it immediately clear. Every word earns its place, and there's no unnecessary elaboration or redundancy.

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 the complexity (a mutation tool with 7 parameters, 4 required), lack of annotations, and no output schema, the description is incomplete. It doesn't provide enough context for safe and effective use—missing details on behavior, parameters, and expected outcomes. The agent would struggle to invoke this tool correctly without additional information.

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 have descriptions in the schema. The tool description adds no information about parameters beyond what's implied by the tool name (e.g., 'title' and 'description' might be guessed). It doesn't explain what 'milestoneId', 'assignees', 'labels', 'priority', or 'type' mean or how to format them, failing to compensate for the low schema coverage.

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 verb ('Create') and resource ('GitHub issue'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'add_issues_to_sprint' or 'update_issue', which also involve GitHub issue operations, so it doesn't reach the highest clarity level.

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. It doesn't mention prerequisites (e.g., needing repository access), when not to use it (e.g., for modifying existing issues), or point to sibling tools like 'update_issue' for different scenarios. The agent must 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

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/HarshKumarSharma/MCP'

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