Skip to main content
Glama

create_issue_comment

Add comments to AtomGit repository issues to provide updates, ask questions, or share information with collaborators.

Instructions

Create an issue comment in a AtomGit repository issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner, typically referred to as 'username (owner)'. Case-insensitive.
repoYesRepository name. Case-insensitive.
issue_numberYesIssue number
bodyYesIssue comment content (in Markdown format)

Implementation Reference

  • Core handler function that executes the POST request to AtomGit API to create an issue comment.
    export async function createIssueComment(
      owner: string,
      repo: string,
      issue_number: number,
      body: string
    ) {
      return atomGitRequest(
        `https://api.atomgit.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/issues/${encodeURIComponent(issue_number)}/comments`,
        {
          method: "POST",
          body: {
            body
          },
        }
      );
    }
  • Zod input schema used for validation in both registration and handler.
    export const CreateIssueCommentSchema = z.object({
      owner: z.string().describe("Repository owner, typically referred to as 'username (owner)'. Case-insensitive."),
      repo: z.string().describe("Repository name. Case-insensitive."),
      issue_number: z.number().describe("Issue number"),
      body: z.string().describe("Issue comment content (in Markdown format)"),
    });
  • index.ts:126-130 (registration)
    Tool registration object in the ListTools response, defining name, description, and schema.
    {
      name: "create_issue_comment",
      description: "Create an issue comment in a AtomGit repository issue",
      inputSchema: zodToJsonSchema(issues.CreateIssueCommentSchema),
    },
  • Dispatcher handler case for 'create_issue_comment' tool: parses args, calls the core function, formats response and handles errors.
    case "create_issue_comment": {
      const args = issues.CreateIssueCommentSchema.parse(request.params.arguments);
      const { owner, repo, issue_number, body } = args;
    
      try {
        console.error(`[DEBUG] Attempting to create issue comment in ${owner}/${repo}`);
    
        const issue = await issues.createIssueComment(owner, repo, issue_number, body);
    
        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 comment: ${error.message}${error.stack ? `\nStack: ${error.stack}` : ''
          }`
        );
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Create' implies a write operation, it doesn't specify authentication requirements, rate limits, error conditions, or what happens on success (e.g., returns the created comment). For a mutation tool with zero annotation coverage, this is a significant gap.

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 any fluff or redundancy. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 mutation tool (creating a comment) with no annotations and no output schema, the description is incomplete. It lacks crucial context like authentication needs, response format, error handling, or how it differs from similar tools. This leaves significant gaps for an AI agent to use it correctly.

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 100%, so the schema fully documents all four parameters (owner, repo, issue_number, body). The description adds no additional parameter semantics beyond what's in the schema, such as format examples or constraints. Baseline 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') and target resource ('issue comment in a AtomGit repository issue'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'create_pull_request_comment' or 'create_pull_request_reply', which also create comments but on different resources.

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. It doesn't mention prerequisites (e.g., needing an existing issue), exclusions, or comparisons to sibling tools like 'create_issue' (for creating the issue itself) or comment tools for pull requests.

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