Skip to main content
Glama

search_issues

Query and filter issues and pull requests across GitHub repositories by parameters like sort, order, and pagination for targeted results.

Instructions

Search for issues and pull requests across GitHub repositories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderNo
pageNo
per_pageNo
qYes
sortNo

Implementation Reference

  • The core handler function implementing the logic for the 'search_issues' tool. It constructs the GitHub API URL for searching issues and makes the request.
    export async function searchIssues(params: z.infer<typeof SearchIssuesSchema>) {
      return githubRequest(buildUrl("https://api.github.com/search/issues", params));
    }
  • Zod schema definition for the input parameters of the search_issues tool, extending the base SearchOptions with issue-specific sort options. Exported as SearchIssuesSchema.
    export const SearchIssuesOptions = SearchOptions.extend({
      sort: z.enum([
        "comments",
        "reactions",
        "reactions-+1",
        "reactions--1",
        "reactions-smile",
        "reactions-thinking_face",
        "reactions-heart",
        "reactions-tada",
        "interactions",
        "created",
        "updated",
      ]).optional(),
    });
    
    export const SearchCodeSchema = SearchOptions;
    export const SearchUsersSchema = SearchUsersOptions;
    export const SearchIssuesSchema = SearchIssuesOptions;
  • index.ts:140-144 (registration)
    Tool registration in the MCP server's list of tools, including name, description, and input schema reference.
    {
      name: "search_issues",
      description: "Search for issues and pull requests across GitHub repositories",
      inputSchema: zodToJsonSchema(search.SearchIssuesSchema),
    },
  • index.ts:425-431 (registration)
    Dispatch handler in the MCP server's CallToolRequestHandler that parses arguments, calls the searchIssues function, and returns the results.
    case "search_issues": {
      const args = search.SearchIssuesSchema.parse(request.params.arguments);
      const results = await search.searchIssues(args);
      return {
        content: [{ type: "text", text: JSON.stringify(results, null, 2) }],
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('search') but doesn't cover critical traits like authentication needs, rate limits, pagination behavior (implied by 'page' and 'per_page' params but not explained), or what the output looks like (no output schema). This is a significant gap for a search tool with multiple parameters.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero waste—it directly states the tool's purpose without fluff. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 (5 parameters, 0% schema coverage, no annotations, no output schema), the description is incomplete. It lacks parameter explanations, behavioral context (e.g., search syntax, limits), and output details, making it inadequate for an agent to use the tool effectively without external knowledge.

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 schema provides no parameter descriptions. The description adds no semantic information about parameters—it doesn't explain 'q' as a query string, 'order' as sorting direction, 'sort' as criteria, or 'page'/'per_page' for pagination. With 5 parameters (1 required) and no schema help, the description fails to compensate, leaving parameters largely unexplained.

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 ('search') and resource ('issues and pull requests') with scope ('across GitHub repositories'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'search_code', 'search_repositories', or 'search_users', which all search GitHub but for different resources.

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. It doesn't mention sibling search tools (e.g., 'search_code' for code, 'search_repositories' for repos) or non-search tools like 'list_issues' for unfiltered listing, leaving the agent to infer usage from the name alone.

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