Skip to main content
Glama

add_issue_comment

Add comments to GitHub issues by specifying the repository owner, repository name, issue number, and comment text using GitHub MCP Server Plus.

Instructions

Add a comment to an existing issue

Input Schema

NameRequiredDescriptionDefault
bodyYes
issue_numberYes
ownerYes
repoYes

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "body": { "type": "string" }, "issue_number": { "type": "number" }, "owner": { "type": "string" }, "repo": { "type": "string" } }, "required": [ "owner", "repo", "issue_number", "body" ], "type": "object" }

Implementation Reference

  • Core implementation of the add_issue_comment tool: makes POST request to GitHub API to add a comment to the specified issue.
    export async function addIssueComment( owner: string, repo: string, issue_number: number, body: string ) { return githubRequest(`https://api.github.com/repos/${owner}/${repo}/issues/${issue_number}/comments`, { method: "POST", body: { body }, }); }
  • Zod schema defining the input parameters for the add_issue_comment tool.
    export const IssueCommentSchema = z.object({ owner: z.string(), repo: z.string(), issue_number: z.number(), body: z.string(), });
  • index.ts:134-137 (registration)
    Registration of the add_issue_comment tool in the MCP server's list of tools.
    name: "add_issue_comment", description: "Add a comment to an existing issue", inputSchema: zodToJsonSchema(issues.IssueCommentSchema) },
  • Dispatcher/handler in the CallToolRequest that validates input and invokes the addIssueComment function.
    case "add_issue_comment": { const args = issues.IssueCommentSchema.parse(request.params.arguments); const { owner, repo, issue_number, body } = args; const result = await issues.addIssueComment(owner, repo, issue_number, body); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }

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/PhialsBasement/mcp-github-server-plus'

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