Skip to main content
Glama

create-issue

Create new issues in GitHub repositories to report bugs, request features, or track tasks directly through the GitHub MCP Server.

Instructions

Create a new issue in a GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner (username or organization)
repoYesRepository name
titleYesIssue title
bodyYesIssue body
labelsNoLabels to apply to the issue

Implementation Reference

  • The handler function that implements the 'create-issue' tool logic. It uses the Octokit client to create a new issue in a GitHub repository and returns the issue details or an error message.
    const createIssue = async (args: CreateIssueArgs) => {
      const { owner, repo, title, body, labels = [] } = args;
      
      try {
        const response = await octokit.rest.issues.create({
          owner,
          repo,
          title,
          body,
          labels,
        });
        
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                {
                  number: response.data.number,
                  title: response.data.title,
                  url: response.data.html_url,
                  created_at: response.data.created_at,
                  message: "Issue created successfully",
                },
                null,
                2
              ),
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
        return {
          content: [
            {
              type: "text",
              text: `Error creating issue: ${errorMessage}`,
            },
          ],
        };
      }
    };
  • The schema definition for the 'create-issue' tool, including inputSchema with properties for owner, repo, title, body, and optional labels.
    "create-issue": {
      name: "create-issue",
      description: "Create a new issue in a GitHub repository",
      inputSchema: {
        type: "object",
        properties: {
          owner: {
            type: "string",
            description: "Repository owner (username or organization)",
          },
          repo: {
            type: "string",
            description: "Repository name",
          },
          title: {
            type: "string",
            description: "Issue title",
          },
          body: {
            type: "string",
            description: "Issue body",
          },
          labels: {
            type: "array",
            items: {
              type: "string"
            },
            description: "Labels to apply to the issue",
          }
        },
        required: ["owner", "repo", "title", "body"],
      },
    },
  • src/tools.ts:322-327 (registration)
    Export of toolHandlers object that maps tool names to their handler functions, including 'create-issue' to createIssue.
    export const toolHandlers = {
      "search-repos": searchRepos,
      "get-repo-info": getRepoInfo,
      "list-issues": listIssues,
      "create-issue": createIssue,
    };
  • src/handlers.ts:19-21 (registration)
    Registration of ListToolsRequestSchema handler, which exposes all tool schemas (including create-issue) via Object.values(tools).
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
        tools: Object.values(tools)
    }));
  • src/handlers.ts:22-32 (registration)
    Registration of CallToolRequestSchema handler, which dispatches to the appropriate tool handler (including createIssue for 'create-issue') based on name.
        server.setRequestHandler(CallToolRequestSchema, async (request) => {
            type ToolHandlerKey = keyof typeof toolHandlers;
            const { name, arguments: params } = request.params ?? {};
            const handler = toolHandlers[name as ToolHandlerKey];
    
            if (!handler) throw new Error("tool not found");
    
            type HandlerParams = Parameters<typeof handler>;
            return handler(params as any);
        })
    }
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. While 'Create' implies a write/mutation operation, the description doesn't disclose important behavioral traits like authentication requirements, rate limits, whether the operation is idempotent, what happens on duplicate titles, or what the response looks like. It's minimal for a mutation tool.

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 states the core purpose without any wasted words. It's appropriately sized and front-loaded with the essential information.

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?

For a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address authentication needs, error conditions, response format, or behavioral constraints. While the schema covers parameters well, the overall context for using this tool is incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, all 5 parameters are already documented in the input schema. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain relationships between parameters, provide examples, or clarify edge cases. The baseline of 3 is appropriate when the schema does the heavy lifting.

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 target resource ('in a GitHub repository'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from its siblings (get-repo-info, list-issues, search-repos) beyond the obvious difference in operation type.

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. There's no mention of prerequisites (like authentication needs), when-not-to-use scenarios, or how this differs from related operations in sibling tools beyond the basic function.

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

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