Skip to main content
Glama
PhialsBasement

GitHub MCP Server Plus

list_issues

Retrieve and filter issues from GitHub repositories by state, labels, date, and sorting criteria to manage project tasks effectively.

Instructions

List issues in a GitHub repository with filtering options

Input Schema

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

Implementation Reference

  • Core handler function that builds the GitHub API URL with query parameters and fetches the list of issues.
    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)
      );
    }
  • Zod schema defining the input options for the list_issues tool, including owner, repo, and various filters.
    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(),
    });
  • index.ts:123-127 (registration)
    Tool registration in the listTools response, specifying name, description, and input schema.
    {
      name: "list_issues",
      description: "List issues in a GitHub repository with filtering options",
      inputSchema: zodToJsonSchema(issues.ListIssuesOptionsSchema)
    },
  • Dispatch handler in the main CallToolRequestSchema switch that parses arguments and delegates to the issues.listIssues function.
    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) }],
      };
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.7/5.0
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.