Skip to main content
Glama
piyushgIITian

GitHub Enterprise MCP Server

create-issue

Create a new issue in a GitHub repository by specifying the owner, repository name, title, and optional details like description, assignees, labels, or milestone.

Instructions

Create a new issue in a GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assigneesNo
bodyNo
labelsNo
milestoneNo
ownerYes
repoYes
titleYes

Implementation Reference

  • The main handler function that executes the create-issue tool logic: validates input using CreateIssueSchema, calls GitHub API to create the issue, and returns a formatted response.
    export async function createIssue(args: unknown): Promise<any> {
      const { owner, repo, title, body, assignees, milestone, labels } = CreateIssueSchema.parse(args);
      const github = getGitHubApi();
    
      return tryCatchAsync(async () => {
        const { data } = await github.getOctokit().issues.create({
          owner,
          repo,
          title,
          body,
          assignees,
          milestone,
          labels,
        });
    
        return {
          id: data.id,
          number: data.number,
          title: data.title,
          state: data.state,
          assignees: data.assignees?.map((assignee) => ({
            login: assignee.login,
            id: assignee.id,
          })),
          user: data.user ? {
            login: data.user.login,
            id: data.user.id,
          } : null,
          labels: data.labels?.map((label) => 
            typeof label === 'string' ? label : {
              name: label.name,
              color: label.color,
            }
          ),
          milestone: data.milestone ? {
            number: data.milestone.number,
            title: data.milestone.title,
          } : null,
          created_at: data.created_at,
          updated_at: data.updated_at,
          body: data.body,
          url: data.html_url,
        };
      }, 'Failed to create issue');
    }
  • Zod schema for validating the input parameters of the create-issue tool.
    export const CreateIssueSchema = OwnerRepoSchema.extend({
      title: z.string().min(1, 'Issue title is required'),
      body: z.string().optional(),
      assignees: z.array(z.string()).optional(),
      milestone: z.number().optional(),
      labels: z.array(z.string()).optional(),
    });
  • Registration and dispatch of the create-issue tool in the main CallToolRequest handler switch statement.
    case 'create-issue':
      result = await createIssue(parsedArgs);
      break;
  • src/server.ts:586-622 (registration)
    Tool registration in the ListTools response, including name, description, and input schema.
    {
      name: 'create-issue',
      description: 'Create a new issue in a GitHub repository',
      inputSchema: {
        type: 'object',
        properties: {
          owner: {
            type: 'string',
          },
          repo: {
            type: 'string',
          },
          title: {
            type: 'string',
          },
          body: {
            type: 'string',
          },
          assignees: {
            type: 'array',
            items: {
              type: 'string',
            },
          },
          milestone: {
            type: 'number',
          },
          labels: {
            type: 'array',
            items: {
              type: 'string',
            },
          },
        },
        required: ['owner', 'repo', 'title'],
        additionalProperties: false,
      },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool creates an issue but lacks details on permissions needed, rate limits, whether it's idempotent, or what happens on success/failure. 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 that gets straight to the point with no wasted words. It's appropriately sized for a basic tool definition and front-loaded with the core action.

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 tool's complexity (7 parameters, mutation operation), lack of annotations, 0% schema coverage, and no output schema, the description is insufficient. It doesn't explain parameters, behavioral traits, or return values, leaving the agent with inadequate information to use the tool 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?

The schema description coverage is 0%, meaning none of the 7 parameters are documented in the schema. The description adds no parameter information beyond implying 'owner', 'repo', and 'title' might be involved (from required fields), but it doesn't explain what these parameters mean, their formats, or optional fields like 'body' or 'labels'. This fails to compensate for the schema gap.

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 ('Create a new issue') and resource ('in a GitHub repository'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'update-issue' or 'list-issues' beyond the basic verb, which prevents 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 like 'update-issue' or 'list-issues', nor does it mention prerequisites such as repository access or authentication requirements. It only states what the tool does, not when or why to choose it.

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/piyushgIITian/github-enterprice-mcp'

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