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) }], }; }

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