Skip to main content
Glama

create_issue

Generate a new issue in a GitHub repository by specifying owner, repo, title, and optional details like body, assignees, milestone, and labels.

Instructions

Create a new issue in a GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assigneesNo
bodyNo
labelsNo
milestoneNo
ownerYes
repoYes
titleYes

Implementation Reference

  • MCP tool handler for 'create_issue': parses input using _CreateIssueSchema, extracts parameters, calls issues.createIssue, and returns the result as JSON.
    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) }], }; }
  • Zod schemas for create_issue: CreateIssueOptionsSchema (options), CreateIssueSchema (with owner/repo), _CreateIssueSchema (adds github_pat for internal use). Used for validation and JSON schema conversion.
    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:103-107 (registration)
    Tool registration in ListTools response: defines name, description, and inputSchema based on CreateIssueSchema.
    { name: "create_issue", description: "Create a new issue in a GitHub repository", inputSchema: zodToJsonSchema(issues.CreateIssueSchema), },
  • Core implementation of createIssue: makes POST request to GitHub API /issues endpoint using githubRequest utility.
    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, } ); }

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