Skip to main content
Glama

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
NameRequiredDescriptionDefault
issueIdYes

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" } } ] };
  • Registration of the getIssueTool in the central ToolRegistry singleton during built-in tools initialization.
    this.registerTool(getIssueTool);
  • 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); }

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/kunwarVivek/mcp-github-project-manager'

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