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

TableJSON 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

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"),
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral information. It doesn't disclose that this is a read-only operation (implied by 'list'), doesn't mention pagination behavior (though parameters suggest it), rate limits, authentication requirements, or what the return format looks like. The description adds almost no value beyond the tool name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single Chinese sentence. While this is efficient, it's arguably too brief given the tool's complexity (12 parameters, no annotations, no output schema). Every word earns its place, but more content would be justified for this tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 12 parameters, no annotations, no output schema, and multiple sibling tools, the description is inadequate. It doesn't explain the tool's behavior, return format, error conditions, or differentiation from similar tools. The description fails to compensate for the lack of structured metadata about this non-trivial listing operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 12 parameters. The description adds no additional parameter information beyond what's in the schema - it doesn't explain relationships between parameters, provide examples, or clarify semantics. Baseline 3 is appropriate when the schema does all the parameter documentation work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '列出 Gitee 仓库中的 Issues' (List issues in Gitee repositories) states the basic action and resource but is vague about scope and filtering capabilities. It doesn't distinguish this from sibling tools like 'get_issue' (which retrieves a single issue) or mention that this lists multiple issues with filtering options.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives. The description doesn't mention that this is for listing multiple issues with filtering, while 'get_issue' is for retrieving a single specific issue, or that 'create_issue' is for creating new issues. There's no context about prerequisites or typical use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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