Skip to main content
Glama

get_issue

Retrieve detailed information about a specific GitHub issue by providing repository owner, repository name, and issue number.

Instructions

Get details of a specific issue in a GitHub repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYes
repoYes
issue_numberYes

Implementation Reference

  • The core handler function that executes the tool logic by making a GitHub API request to fetch 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}`);
    }
  • Zod schemas for input validation: GetIssueSchema defines owner, repo, issue_number; _GetIssueSchema adds github_pat.
    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 MCP server's listTools response, specifying 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)
    Dispatch logic in the CallToolRequest handler that validates arguments and invokes the getIssue handler.
    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) }],
      };
    }

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