Skip to main content
Glama

list_issues

Retrieve and filter GitHub repository issues by status, labels, sorting, and time parameters to manage project tracking and bug reporting.

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

  • The core handler function that implements the logic to list issues from a GitHub repository using the GitHub API.
    export async function listIssues(
      github_pat: string,
      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(
        github_pat,
        buildUrl(`https://api.github.com/repos/${owner}/${repo}/issues`, urlParams)
      );
    }
  • Zod schema defining the input parameters for the list_issues tool, used in tool registration.
    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(),
    });
  • src/index.ts:128-132 (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)
    },
  • Dispatcher case in the CallToolRequest handler that parses arguments using the extended schema and invokes the listIssues function.
    case "list_issues": {
      const args = issues._ListIssuesOptionsSchema.parse(params.arguments);
      const { github_pat, owner, repo, ...options } = args;
      const result = await issues.listIssues(github_pat, owner, repo, options);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • Extended Zod schema used for argument parsing in the tool dispatcher, adding the github_pat field.
    export const _ListIssuesOptionsSchema = ListIssuesOptionsSchema.extend({
      github_pat: z.string().describe("GitHub Personal Access Token"),
    });
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. It mentions 'filtering options' but doesn't explain key behaviors: whether this is a read-only operation, how pagination works (given 'page' and 'per_page' parameters), rate limits, authentication requirements, or what the output looks like. For a tool with 9 parameters and no annotation coverage, this leaves significant gaps.

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 gets straight to the point. It's appropriately sized for a list operation, though it could be slightly more informative without losing conciseness. No wasted words or redundancy.

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, no annotations, no output schema), the description is inadequate. It doesn't explain the tool's behavior, output format, or parameter meanings. For a list tool with filtering capabilities, more context is needed to help an agent use it correctly, especially with sibling tools like 'search_issues' that might overlap.

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?

Schema description coverage is 0%, so the description must compensate by explaining parameters. It only vaguely mentions 'filtering options' without detailing what those filters are (e.g., labels, state, sorting). The 9 parameters (including complex ones like arrays and enums) are not addressed, leaving their purposes unclear beyond what the bare schema provides.

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 action ('List issues') and resource ('in a GitHub repository'), making the purpose immediately understandable. It also mentions 'filtering options' which hints at capabilities. However, it doesn't explicitly differentiate 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 like 'search_issues' or 'get_issue'. It mentions 'filtering options' but doesn't specify what makes this tool distinct from other issue-related tools in the sibling list. No context about prerequisites or exclusions is provided.

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

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

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