Skip to main content
Glama

create_issue_comment

Add a comment to a specific issue in an AtomGit repository. Specify repository owner, repository name, issue number, and comment content in Markdown format.

Instructions

Create an issue comment in a AtomGit repository issue

Input Schema

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

Implementation Reference

  • Core handler function that performs the HTTP POST request to the 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 schema defining the input parameters (owner, repo, issue_number, body) for the create_issue_comment tool.
    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:127-131 (registration)
    Registration of the 'create_issue_comment' tool in the MCP server's listTools response, including name, description, and input schema reference.
    name: "create_issue_comment", description: "Create an issue comment in a AtomGit repository issue", inputSchema: zodToJsonSchema(issues.CreateIssueCommentSchema), },
  • MCP callTool dispatch handler that parses arguments, calls the core createIssueComment function, handles errors, and formats the response.
    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}` : '' }` ); } }

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