Skip to main content
Glama

add_issue_comment

Add comments to issues in Gitee repositories by specifying the repository owner, repo, issue number, and comment content.

Instructions

向 Gitee 仓库中的 Issue 添加评论

Input Schema

NameRequiredDescriptionDefault
bodyYesComment content
issue_numberYesIssue number
ownerYesRepository owner path (enterprise, organization, or personal path)
repoYesRepository path

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "body": { "description": "Comment content", "type": "string" }, "issue_number": { "description": "Issue number", "type": [ "number", "string" ] }, "owner": { "description": "Repository owner path (enterprise, organization, or personal path)", "type": "string" }, "repo": { "description": "Repository path", "type": "string" } }, "required": [ "owner", "repo", "issue_number", "body" ], "type": "object" }

Implementation Reference

  • The async function that implements the logic to add a comment to a Gitee issue by making a POST request to the Gitee API.
    export async function addIssueComment( owner: string, repo: string, issueNumber: number | string, body: string ) { owner = validateOwnerName(owner); repo = validateRepositoryName(repo); const url = `/repos/${owner}/${repo}/issues/${issueNumber}/comments`; const response = await giteeRequest(url, "POST", { body }); return GiteeIssueCommentSchema.parse(response); }
  • Zod schema defining the input parameters for adding an issue comment: owner, repo, issue_number, body.
    export const IssueCommentSchema = z.object({ // 仓库所属空间地址 (企业、组织或个人的地址 path) owner: z.string().describe("Repository owner path (enterprise, organization, or personal path)"), // 仓库路径 (path) repo: z.string().describe("Repository path"), // Issue 编号 issue_number: z.union([z.number(), z.string()]).describe("Issue number"), // 评论内容 body: z.string().describe("Comment content"), });
  • index.ts:179-187 (registration)
    Registers the 'add_issue_comment' tool with the MCP server, linking the schema and handler from issueOperations.
    server.registerTool({ name: "add_issue_comment", description: "向 Gitee 仓库中的 Issue 添加评论", schema: issueOperations.IssueCommentSchema, handler: async (params: any) => { const { owner, repo, issue_number, body } = params; return await issueOperations.addIssueComment(owner, repo, issue_number, body); }, });

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/normal-coder/gitee-mcp-server'

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