Skip to main content
Glama

get_issue

Retrieve specific issues from a Gitee repository by providing the owner, repository name, and issue number. Simplifies issue management and tracking.

Instructions

获取 Gitee 仓库中的特定 Issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_numberYesIssue number
ownerYesRepository owner path (enterprise, organization, or personal path)
repoYesRepository path

Implementation Reference

  • The handler function that retrieves a specific issue from a Gitee repository by making an API request and parsing the response with GiteeIssueSchema.
    export async function getIssue(
      owner: string,
      repo: string,
      issueNumber: number | string
    ) {
      owner = validateOwnerName(owner);
      repo = validateRepositoryName(repo);
    
      const url = `/repos/${owner}/${repo}/issues/${issueNumber}`;
      const response = await giteeRequest(url);
    
      return GiteeIssueSchema.parse(response);
  • Zod schema defining the input parameters for the get_issue tool: owner, repo, and issue_number.
    export const GetIssueSchema = 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"),
    });
  • index.ts:159-167 (registration)
    Registration of the 'get_issue' tool in the MCP server, specifying name, description, schema, and handler that delegates to issueOperations.getIssue.
    server.registerTool({
      name: "get_issue",
      description: "获取 Gitee 仓库中的特定 Issue",
      schema: issueOperations.GetIssueSchema,
      handler: async (params: any) => {
        const { owner, repo, issue_number } = params;
        return await issueOperations.getIssue(owner, repo, issue_number);
      },
    });

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