Skip to main content
Glama

list_issues

Retrieve and filter Issues from a Gitee repository by state, sorting, labels, assignee, or creator. Manage and track project tasks efficiently with customizable query parameters.

Instructions

列出 Gitee 仓库中的 Issues

Input Schema

NameRequiredDescriptionDefault
assigneeNoFilter issues assigned to a specific user
creatorNoFilter issues created by a specific user
directionNoSort directiondesc
labelsNoLabels, multiple labels separated by commas
milestoneNoMilestone ID
ownerYesRepository owner path (enterprise, organization, or personal path)
pageNoPage number
per_pageNoNumber of items per page, maximum 100
programNoFilter issues for a specific program
repoYesRepository path
sortNoSort fieldcreated
stateNoIssue stateopen

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "assignee": { "description": "Filter issues assigned to a specific user", "type": "string" }, "creator": { "description": "Filter issues created by a specific user", "type": "string" }, "direction": { "default": "desc", "description": "Sort direction", "enum": [ "asc", "desc" ], "type": "string" }, "labels": { "description": "Labels, multiple labels separated by commas", "type": "string" }, "milestone": { "description": "Milestone ID", "type": "number" }, "owner": { "description": "Repository owner path (enterprise, organization, or personal path)", "type": "string" }, "page": { "default": 1, "description": "Page number", "type": "integer" }, "per_page": { "description": "Number of items per page, maximum 100", "maximum": 100, "minimum": 1, "type": "integer" }, "program": { "description": "Filter issues for a specific program", "type": "string" }, "repo": { "description": "Repository path", "type": "string" }, "sort": { "default": "created", "description": "Sort field", "enum": [ "created", "updated", "comments" ], "type": "string" }, "state": { "default": "open", "description": "Issue state", "enum": [ "open", "closed", "all" ], "type": "string" } }, "required": [ "owner", "repo" ], "type": "object" }

Implementation Reference

  • index.ts:149-157 (registration)
    Registration of the 'list_issues' MCP tool, specifying name, description, schema from issueOperations, and a handler wrapper that delegates to issueOperations.listIssues.
    server.registerTool({ name: "list_issues", description: "列出 Gitee 仓库中的 Issues", schema: issueOperations.ListIssuesOptionsSchema, handler: async (params: any) => { const { owner, repo, ...options } = params; return await issueOperations.listIssues(owner, repo, options); }, });
  • The core handler function listIssues that constructs the Gitee API URL for listing issues, adds query parameters from options, makes the request, and parses the response as an array of GiteeIssueSchema.
    export async function listIssues( owner: string, repo: string, options: Omit<ListIssuesOptions, "owner" | "repo"> ) { owner = validateOwnerName(owner); repo = validateRepositoryName(repo); const url = new URL(`${getGiteeApiBaseUrl()}/repos/${owner}/${repo}/issues`); // Add query parameters Object.entries(options).forEach(([key, value]) => { if (value !== undefined) { url.searchParams.append(key, value.toString()); } }); const response = await giteeRequest(url.toString()); return z.array(GiteeIssueSchema).parse(response); }
  • Zod schema defining the input parameters for the list_issues tool, including owner, repo, state, sort, direction, pagination, and filters.
    export const ListIssuesOptionsSchema = z.object({ // 仓库所属空间地址 (企业、组织或个人的地址 path) owner: z.string().describe("Repository owner path (enterprise, organization, or personal path)"), // 仓库路径 (path) repo: z.string().describe("Repository path"), // Issue 状态 state: z.enum(["open", "closed", "all"]).default("open").optional().describe("Issue state"), // 排序字段 sort: z.enum(["created", "updated", "comments"]).default("created").optional().describe("Sort field"), // 排序方向 direction: z.enum(["asc", "desc"]).default("desc").optional().describe("Sort direction"), // 里程碑 ID milestone: z.number().optional().describe("Milestone ID"), // 标签,多个标签以逗号分隔 labels: z.string().optional().describe("Labels, multiple labels separated by commas"), // 当前的页码 page: z.number().int().default(1).optional().describe("Page number"), // 每页的数量,最大为 100 per_page: z.number().int().min(1).max(100).optional().describe("Number of items per page, maximum 100"), // 筛选指定用户负责的 Issue assignee: z.string().optional().describe("Filter issues assigned to a specific user"), // 筛选指定用户创建的 Issue creator: z.string().optional().describe("Filter issues created by a specific user"), // 筛选指定项目的 Issue program: z.string().optional().describe("Filter issues for a specific program"), });

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