Skip to main content
Glama

search_issues

Search for issues and pull requests across GitHub repositories. Filter results by criteria like sort order, page number, and per page count. Useful for managing and tracking repository workflows.

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 that executes the GitHub API call to search for issues and pull requests.
    export async function searchIssues(github_pat: string, params: z.infer<typeof SearchIssuesSchema>) { return githubRequest(github_pat, buildUrl("https://api.github.com/search/issues", params)); }
  • Zod schema definitions for the search_issues tool: SearchIssuesSchema (public) and _SearchIssuesSchema (internal with github_pat).
    export const SearchIssuesSchema = SearchIssuesOptions; export const _SearchIssuesSchema = SearchIssuesSchema.extend({ github_pat: z.string().describe("GitHub Personal Access Token"), });
  • Schema options specific to searching issues, extending the base SearchOptions with sort field.
    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(), });
  • src/index.ts:148-152 (registration)
    Registration of the search_issues tool in the ListTools response, including name, description, and input schema.
    { name: "search_issues", description: "Search for issues and pull requests across GitHub repositories", inputSchema: zodToJsonSchema(search.SearchIssuesSchema), },
  • src/index.ts:464-471 (registration)
    Dispatch logic in the CallTool handler that parses input, calls the searchIssues function, and formats the response.
    case "search_issues": { const argsWithPat = search._SearchIssuesSchema.parse(params.arguments); const { github_pat, ...args } = argsWithPat; const results = await search.searchIssues(github_pat, 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/MissionSquad/mcp-github'

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