Skip to main content
Glama

search_issues

Search for issues and pull requests across GitHub repositories to find relevant discussions, track bugs, or monitor project activity.

Instructions

Search for issues and pull requests across GitHub repositories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYes
orderNo
pageNo
per_pageNo
sortNo

Implementation Reference

  • The primary handler function that executes the GitHub API search for issues using the search/issues endpoint.
    export async function searchIssues(github_pat: string, params: z.infer<typeof SearchIssuesSchema>) { return githubRequest(github_pat, buildUrl("https://api.github.com/search/issues", params)); }
  • Defines the Zod schemas for input validation: SearchIssuesSchema (public) and _SearchIssuesSchema (with github_pat).
    export const SearchIssuesSchema = SearchIssuesOptions; export const _SearchIssuesSchema = SearchIssuesSchema.extend({ github_pat: z.string().describe("GitHub Personal Access Token"), });
  • src/index.ts:150-153 (registration)
    Registers the tool in the MCP server's listTools response, providing name, description, and input schema.
    description: "Search for issues and pull requests across GitHub repositories", inputSchema: zodToJsonSchema(search.SearchIssuesSchema), }, {
  • The MCP server dispatcher case that parses arguments and calls the searchIssues handler.
    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) }], }; }
  • Base schema options for searching issues, extending common SearchOptions with issue-specific sort options.
    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(), });

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