get_issue
Retrieve detailed information about a specific issue in a GitHub repository by providing the repository owner, repo name, and issue number. Facilitates precise issue tracking and management.
Instructions
Get details of a specific issue in a GitHub repository.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_number | Yes | ||
| owner | Yes | ||
| repo | Yes |
Implementation Reference
- src/operations/issues.ts:75-77 (handler)The core handler function that performs the GitHub API request to retrieve the specified issue.export async function getIssue(github_pat: string, owner: string, repo: string, issue_number: number) { return githubRequest(github_pat, `https://api.github.com/repos/${owner}/${repo}/issues/${issue_number}`); }
- src/operations/issues.ts:4-12 (schema)Zod schemas for input validation: GetIssueSchema (public inputs) and _GetIssueSchema (internal with PAT). Used in tool registration and dispatch.export const GetIssueSchema = z.object({ owner: z.string(), repo: z.string(), issue_number: z.number(), }); export const _GetIssueSchema = GetIssueSchema.extend({ github_pat: z.string().describe("GitHub Personal Access Token"), });
- src/index.ts:158-162 (registration)Tool registration in the listTools handler, defining name, description, and input schema.{ name: "get_issue", description: "Get details of a specific issue in a GitHub repository.", inputSchema: zodToJsonSchema(issues.GetIssueSchema) },
- src/index.ts:524-530 (registration)Tool dispatch in the callTool handler: parses arguments and invokes the getIssue function.case "get_issue": { const args = issues._GetIssueSchema.parse(params.arguments); const issue = await issues.getIssue(args.github_pat, args.owner, args.repo, args.issue_number); return { content: [{ type: "text", text: JSON.stringify(issue, null, 2) }], }; }