Skip to main content
Glama

create_issue

Create a new issue in a GitHub repository to report bugs, request features, or track tasks. Specify repository, title, and optional details like labels or assignees.

Instructions

Create a new issue in a GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYes
repoYes
titleYes
bodyNo
assigneesNo
milestoneNo
labelsNo

Implementation Reference

  • Core handler function that performs the HTTP POST request to the GitHub API to create an issue.
    export async function createIssue( github_pat: string, owner: string, repo: string, options: z.infer<typeof CreateIssueOptionsSchema> ) { return githubRequest( github_pat, `https://api.github.com/repos/${owner}/${repo}/issues`, { method: "POST", body: options, } ); }
  • Zod schemas defining the input structure for creating an issue, including options, base schema, and extended schema with GitHub PAT.
    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(), }); export const CreateIssueSchema = z.object({ owner: z.string(), repo: z.string(), ...CreateIssueOptionsSchema.shape, }); export const _CreateIssueSchema = CreateIssueSchema.extend({ github_pat: z.string().describe("GitHub Personal Access Token"), });
  • src/index.ts:104-107 (registration)
    Tool registration in the ListTools response, specifying name, description, and input schema.
    name: "create_issue", description: "Create a new issue in a GitHub repository", inputSchema: zodToJsonSchema(issues.CreateIssueSchema), },
  • MCP server dispatch handler case for 'create_issue', parsing args and calling the core createIssue function.
    case "create_issue": { const args = issues._CreateIssueSchema.parse(params.arguments); const { github_pat, owner, repo, ...options } = args; const issue = await issues.createIssue(github_pat, 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/MissionSquad/mcp-github'

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