Skip to main content
Glama

create_issue

Create a new issue in an AtomGit repository to report bugs, request features, or track tasks for open source collaboration.

Instructions

Create a new issue in a AtomGit repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner, typically referred to as 'username (owner)'. Case-insensitive.
repoYesRepository name. Case-insensitive.
titleYesIssue title
bodyYesIssue content (in Markdown format)
assigneesNo
milestoneNo
labelsNo

Implementation Reference

  • Core handler function that executes the tool logic by making a POST request to the AtomGit API to create an issue.
    export async function createIssue(
      owner: string,
      repo: string,
      options: z.infer<typeof CreateIssueOptionsSchema>
    ) {
      return atomGitRequest(
        `https://api.atomgit.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/issues`,
        {
          method: "POST",
          body: options,
        },
      );
    }
  • MCP CallToolRequest handler for 'create_issue' that validates input, calls the core createIssue function, handles errors, and returns the formatted response.
    case "create_issue": {
      const args = issues.CreateIssueSchema.parse(request.params.arguments);
      const { owner, repo, ...options } = args;
    
      try {
        console.error(`[DEBUG] Attempting to create issue in ${owner}/${repo}`);
        console.error(`[DEBUG] Issue options:`, JSON.stringify(options, null, 2));
    
        const issue = await issues.createIssue(owner, repo, options);
    
        console.error(`[DEBUG] Issue created successfully`);
        return {
          content: [{ type: "text", text: JSON.stringify(issue, null, 2) }],
        };
      } catch (err) {
        // Type guard for Error objects
        const error = err instanceof Error ? err : new Error(String(err));
    
        console.error(`[ERROR] Failed to create issue:`, error);
    
        if (error instanceof AtomGitResourceNotFoundError) {
          throw new Error(
            `Repository '${owner}/${repo}' not found. Please verify:\n` +
            `1. The repository exists\n` +
            `2. You have correct access permissions\n` +
            `3. The owner and repository names are spelled correctly`
          );
        }
    
        // Safely access error properties
        throw new Error(
          `Failed to create issue: ${error.message}${error.stack ? `\nStack: ${error.stack}` : ''
          }`
        );
      }
    }
  • Zod schema defining the input structure for the create_issue tool, used for validation and JSON schema conversion.
    export const CreateIssueSchema = z.object({
      owner: z.string().describe("Repository owner, typically referred to as 'username (owner)'. Case-insensitive."),
      repo: z.string().describe("Repository name. Case-insensitive."),
      ...CreateIssueOptionsSchema.shape,
    });
  • Zod subschema for issue creation options, composed into the main CreateIssueSchema.
    export const CreateIssueOptionsSchema = z.object({
      title: z.string().describe("Issue title"),
      body: z.string().describe("Issue content (in Markdown format)"),
      assignees: z.array(z.string()).optional(),
      milestone: z.number().optional(),
      labels: z.array(z.string()).optional(),
    });
  • index.ts:121-125 (registration)
    Registration of the 'create_issue' tool in the list returned by ListToolsRequest, including name, description, and input schema.
    {
      name: "create_issue",
      description: "Create a new issue in a AtomGit repository",
      inputSchema: zodToJsonSchema(issues.CreateIssueSchema),
    },
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. It states the tool creates an issue but doesn't mention whether this is a write operation (implied by 'Create'), what permissions are required, how errors are handled (e.g., invalid repository), or what the response looks like (e.g., issue ID, confirmation). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every word earning its place by conveying the essential action and target.

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?

Given the complexity of a 7-parameter mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral aspects (e.g., permissions, error handling), usage guidelines relative to siblings, and parameter semantics for undocumented fields. The description alone doesn't provide enough context for an agent to confidently invoke this tool without additional inference or trial-and-error.

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?

Schema description coverage is 57% (4 of 7 parameters have descriptions: owner, repo, title, body), leaving 3 parameters (assignees, milestone, labels) undocumented in the schema. The description adds no parameter-specific information beyond what the schema provides, so it doesn't compensate for the coverage gap. However, the schema descriptions for the required parameters are clear, justifying a baseline score of 3.

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 AtomGit repository'), providing a specific verb+resource combination. However, it doesn't differentiate this tool from its sibling 'create_pull_request' or other issue-related tools like 'assign_issue' or 'create_issue_comment', which would require explicit comparison to achieve a score of 5.

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 like 'create_pull_request' for code changes or 'create_issue_comment' for adding comments to existing issues. It also lacks information about prerequisites (e.g., repository access permissions) or typical use cases, leaving the agent to infer usage context without explicit direction.

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/kaiyuanxiaobing/atomgit-mcp-server'

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