get_issue
Retrieve detailed information about a specific issue in a GitHub repository by providing the repository owner, repository name, and issue number.
Instructions
Get details of a specific issue in a GitHub repository.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | ||
| repo | Yes | ||
| issue_number | Yes |
Implementation Reference
- index.ts:349-355 (handler)The main handler for the 'get_issue' tool in the switch statement of CallToolRequestSchema. It validates input using GetIssueSchema, calls the helper function, and returns the issue details.case "get_issue": { const args = issues.GetIssueSchema.parse(request.params.arguments); const issue = await issues.getIssue(args.owner, args.repo, args.issue_number); return { content: [{ type: "text", text: JSON.stringify(issue, null, 2) }], }; }
- operations/issues.ts:4-8 (schema)Zod schema defining the input parameters for the 'get_issue' tool: owner, repo, and issue_number.export const GetIssueSchema = z.object({ owner: z.string(), repo: z.string(), issue_number: z.number(), });
- index.ts:153-157 (registration)Registration of the 'get_issue' tool in the ListToolsRequestHandler, including name, description, and input schema reference.{ name: "get_issue", description: "Get details of a specific issue in a GitHub repository.", inputSchema: zodToJsonSchema(issues.GetIssueSchema) }
- operations/issues.ts:55-57 (helper)Helper function that performs the actual GitHub API request to fetch the issue details.export async function getIssue(owner: string, repo: string, issue_number: number) { return githubRequest(`https://api.github.com/repos/${owner}/${repo}/issues/${issue_number}`); }