Skip to main content
Glama

create_issue

Create GitHub issues to track bugs, features, or tasks in repositories. Specify repository owner, name, title, and optional description to add new issues.

Instructions

Create an issue in a repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYes
repoYes
titleYes
bodyNo

Implementation Reference

  • The main handler function for the 'create_issue' tool. It validates the input arguments (owner, repo, title, optional body), checks for GitHub token configuration, and delegates to the GitHubClient's createIssue method to POST a new issue.
    async create_issue(args: Record<string, unknown>) { if (!cfg.githubToken) throw new Error("GITHUB_TOKEN is not configured"); const owner = String(args.owner || ""); const repo = String(args.repo || ""); const title = String(args.title || ""); const body = args.body ? String(args.body) : undefined; if (!owner || !repo || !title) throw new Error("owner, repo and title are required"); return client.createIssue(owner, repo, title, body); },
  • The input schema definition for the 'create_issue' tool, specifying properties for owner, repo, title (required), and optional body as strings.
    inputSchema: { type: "object", properties: { owner: { type: "string" }, repo: { type: "string" }, title: { type: "string" }, body: { type: "string" }, }, required: ["owner", "repo", "title"], },
  • The tool registration entry in the tools array of registerGitHub(), including name, description, and input schema.
    { name: "create_issue", description: "Create an issue in a repository", inputSchema: { type: "object", properties: { owner: { type: "string" }, repo: { type: "string" }, title: { type: "string" }, body: { type: "string" }, }, required: ["owner", "repo", "title"], }, },
  • Helper method in GitHubClient class that makes the actual API request to create an issue using POST to /repos/{owner}/{repo}/issues.
    createIssue(owner: string, repo: string, title: string, body?: string) { return this.request(`/repos/${owner}/${repo}/issues`, { method: "POST", body: { title, body }, }); }

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/TaylorChen/muti-mcps'

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