get_issue
Retrieve detailed information about a specific GitHub issue by providing its issue ID. Useful for tracking, debugging, and managing tasks within GitHub projects.
Instructions
Get details of a specific GitHub issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueId | Yes |
Implementation Reference
- Tool definition for 'get_issue' including Zod input schema (issueId: string), description, and usage example.export const getIssueTool: ToolDefinition<GetIssueArgs> = { name: "get_issue", description: "Get details of a specific GitHub issue", schema: getIssueSchema as unknown as ToolSchema<GetIssueArgs>, examples: [ { name: "Get issue details", description: "Get detailed information about an issue", args: { issueId: "42" } } ] };
- src/infrastructure/tools/ToolRegistry.ts:210-210 (registration)Registration of the getIssueTool in the central ToolRegistry singleton during built-in tools initialization.this.registerTool(getIssueTool);
- src/index.ts:306-307 (handler)MCP server tool dispatch handler that validates args and calls ProjectManagementService.getIssue(issueId).case "get_issue": return await this.service.getIssue(args.issueId);
- Service layer handler that delegates to GitHubIssueRepository.findById(issueId) with error mapping.async getIssue(issueId: string): Promise<Issue | null> { try { return await this.issueRepo.findById(issueId); } catch (error) { throw this.mapErrorToMCPError(error); } }
- Repository implementation: GraphQL query by issue number, maps GitHubIssue to domain Issue model with assignees, labels, milestone.async findById(id: IssueId): Promise<Issue | null> { const query = ` query($owner: String!, $repo: String!, $number: Int!) { repository(owner: $owner, name: $repo) { issue(number: $number) { id number title body state createdAt updatedAt assignees(first: 100) { nodes { login } } labels(first: 100) { nodes { name } } milestone { id } } } } `; const response = await this.graphql<GetIssueResponse>(query, { owner: this.owner, repo: this.repo, number: parseInt(id), }); const issue = response.repository.issue; if (!issue) return null; return this.mapGitHubIssueToIssue(issue); }