Skip to main content
Glama

create_issue

Create a new GitHub issue in a repository, specifying title, body, assignees, milestone, and labels. Streamline issue tracking and project management directly via the GitHub MCP Server Plus.

Instructions

Create a new issue in a GitHub repository

Input Schema

NameRequiredDescriptionDefault
assigneesNo
bodyNo
labelsNo
milestoneNo
ownerYes
repoYes
titleYes

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "assignees": { "items": { "type": "string" }, "type": "array" }, "body": { "type": "string" }, "labels": { "items": { "type": "string" }, "type": "array" }, "milestone": { "type": "number" }, "owner": { "type": "string" }, "repo": { "type": "string" }, "title": { "type": "string" } }, "required": [ "owner", "repo", "title" ], "type": "object" }

Implementation Reference

  • The core handler function that executes the GitHub API POST request to create a new issue in the repository.
    export async function createIssue( owner: string, repo: string, options: z.infer<typeof CreateIssueOptionsSchema> ) { return githubRequest( `https://api.github.com/repos/${owner}/${repo}/issues`, { method: "POST", body: options, } ); }
  • The Zod schema for validating the input parameters of the create_issue tool, including owner, repo, and issue options.
    export const CreateIssueSchema = z.object({ owner: z.string(), repo: z.string(), ...CreateIssueOptionsSchema.shape, });
  • The Zod schema defining the options for creating an issue, such as title, body, assignees, etc.
    export const CreateIssueOptionsSchema = z.object({ title: z.string(), body: z.string().optional(), assignees: z.array(z.string()).optional(), milestone: z.number().optional(), labels: z.array(z.string()).optional(), });
  • index.ts:99-102 (registration)
    Registration of the 'create_issue' tool in the MCP server's list of available tools, including name, description, and input schema.
    name: "create_issue", description: "Create a new issue in a GitHub repository", inputSchema: zodToJsonSchema(issues.CreateIssueSchema), },
  • The dispatcher handler in the main CallToolRequestSchema handler that parses arguments, calls the createIssue function, and formats the response.
    case "create_issue": { const args = issues.CreateIssueSchema.parse(request.params.arguments); const { owner, repo, ...options } = args; const issue = await issues.createIssue(owner, repo, options); return { content: [{ type: "text", text: JSON.stringify(issue, null, 2) }], }; }

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/PhialsBasement/mcp-github-server-plus'

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