Skip to main content
Glama

list_issues

Retrieve and filter GitHub repository issues by owner, repo, state, labels, sort, and pagination for streamlined issue tracking and management.

Instructions

List issues in a GitHub repository with filtering options

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directionNo
labelsNo
ownerYes
pageNo
per_pageNo
repoYes
sinceNo
sortNo
stateNo

Implementation Reference

  • index.ts:120-124 (registration)
    Registration of the 'list_issues' tool in the ListTools response, including name, description, and input schema reference.
    {
      name: "list_issues",
      description: "List issues in a GitHub repository with filtering options",
      inputSchema: zodToJsonSchema(issues.ListIssuesOptionsSchema)
    },
  • MCP tool handler for 'list_issues': validates input with schema, calls the listIssues helper, and formats response as text content.
    case "list_issues": {
      const args = issues.ListIssuesOptionsSchema.parse(request.params.arguments);
      const { owner, repo, ...options } = args;
      const result = await issues.listIssues(owner, repo, options);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • Zod schema defining the input parameters for the list_issues tool, including owner, repo, and various filtering options.
    export const ListIssuesOptionsSchema = z.object({
      owner: z.string(),
      repo: z.string(),
      direction: z.enum(["asc", "desc"]).optional(),
      labels: z.array(z.string()).optional(),
      page: z.number().optional(),
      per_page: z.number().optional(),
      since: z.string().optional(),
      sort: z.enum(["created", "updated", "comments"]).optional(),
      state: z.enum(["open", "closed", "all"]).optional(),
    });
  • Helper function that builds the GitHub API URL for listing issues with query parameters from options and performs the HTTP request.
    export async function listIssues(
      owner: string,
      repo: string,
      options: Omit<z.infer<typeof ListIssuesOptionsSchema>, "owner" | "repo">
    ) {
      const urlParams: Record<string, string | undefined> = {
        direction: options.direction,
        labels: options.labels?.join(","),
        page: options.page?.toString(),
        per_page: options.per_page?.toString(),
        since: options.since,
        sort: options.sort,
        state: options.state
      };
    
      return githubRequest(
        buildUrl(`https://api.github.com/repos/${owner}/${repo}/issues`, urlParams)
      );
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'List issues' implies a read operation, the description doesn't address important behavioral aspects like pagination behavior (implied by 'page' and 'per_page' parameters but not explained), rate limits, authentication requirements, error conditions, or what the output looks like. The mention of 'filtering options' is helpful but insufficient for a mutation-free tool with 9 parameters.

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 a single, efficient sentence that communicates the core functionality without unnecessary words. It's appropriately sized for a listing tool, though it could be slightly more informative without losing conciseness. The structure is straightforward and front-loaded with the main purpose.

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?

Given the complexity (9 parameters, 3 with enums, no output schema, and no annotations), the description is insufficiently complete. For a tool with this many filtering options and no structured output documentation, the description should provide more guidance about what the tool returns, how pagination works, and the meaning of key parameters. The current description leaves too much undefined for effective agent use.

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

Parameters2/5

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

With 0% schema description coverage for all 9 parameters, the description provides minimal parameter semantics. It mentions 'filtering options' which hints at the purpose of parameters like 'labels', 'state', and 'since', but doesn't explain any specific parameters, their formats, or constraints. For example, it doesn't clarify that 'owner' and 'repo' are required, what 'since' expects (ISO timestamp), or what the enums mean. The description adds some value but doesn't adequately compensate for the complete lack of schema descriptions.

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

Purpose4/5

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

The description clearly states the verb ('List') and resource ('issues in a GitHub repository'), making the purpose unambiguous. It also mentions 'filtering options' which adds specificity. However, it doesn't explicitly distinguish this tool from sibling tools like 'search_issues' or 'get_issue', which would be needed for a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'search_issues' and 'get_issue' available, there's no indication of when this listing approach is preferable versus searching or fetching individual issues. The description only states what the tool does, not when to choose it.

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/tuanle96/mcp-github'

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