Skip to main content
Glama
piyushgIITian

GitHub Enterprise MCP Server

get-issue

Retrieve detailed information about a specific GitHub repository issue 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
NameRequiredDescriptionDefault
issue_numberYes
ownerYes
repoYes

Implementation Reference

  • The core handler function for the 'get-issue' tool. Validates input using GetIssueSchema, calls GitHub API to fetch the issue, maps the response to a simplified object, and wraps in error handling.
    export async function getIssue(args: unknown): Promise<any> {
      const { owner, repo, issue_number } = GetIssueSchema.parse(args);
      const github = getGitHubApi();
    
      return tryCatchAsync(async () => {
        const { data } = await github.getOctokit().issues.get({
          owner,
          repo,
          issue_number,
        });
    
        return {
          id: data.id,
          number: data.number,
          title: data.title,
          state: data.state,
          locked: data.locked,
          assignees: data.assignees?.map((assignee) => ({
            login: assignee.login,
            id: assignee.id,
            type: assignee.type,
          })),
          user: data.user ? {
            login: data.user.login,
            id: data.user.id,
            type: data.user.type,
          } : null,
          labels: data.labels?.map((label) => 
            typeof label === 'string' ? label : {
              name: label.name,
              color: label.color,
              description: label.description,
            }
          ),
          milestone: data.milestone ? {
            id: data.milestone.id,
            number: data.milestone.number,
            title: data.milestone.title,
            description: data.milestone.description,
            state: data.milestone.state,
          } : null,
          comments: data.comments,
          created_at: data.created_at,
          updated_at: data.updated_at,
          closed_at: data.closed_at,
          body: data.body,
          url: data.html_url,
          pull_request: data.pull_request ? {
            url: data.pull_request.html_url,
          } : null,
        };
      }, 'Failed to get issue');
    }
  • Zod schema used for input validation in the getIssue handler. Extends OwnerRepoSchema with issue_number.
    export const GetIssueSchema = OwnerRepoSchema.extend({
      issue_number: z.number().int().positive(),
    });
  • src/server.ts:567-584 (registration)
    Tool registration in ListToolsRequestHandler, including name, description, and input schema matching GetIssueSchema.
    name: 'get-issue',
    description: 'Get details of a specific issue in a GitHub repository.',
    inputSchema: {
      type: 'object',
      properties: {
        owner: {
          type: 'string',
        },
        repo: {
          type: 'string',
        },
        issue_number: {
          type: 'number',
        },
      },
      required: ['owner', 'repo', 'issue_number'],
      additionalProperties: false,
    },
  • Dispatch registration in CallToolRequestHandler switch statement, calling the getIssue function.
    case 'get-issue':
      result = await getIssue(parsedArgs);
      break;
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions 'Get details' but doesn't disclose behavioral traits such as authentication requirements, rate limits, error handling (e.g., for non-existent issues), or response format. This is a significant gap for a tool with zero annotation coverage, though it correctly indicates a read operation without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—it directly states the tool's purpose without redundancy. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (3 required parameters, no annotations, no output schema), the description is incomplete. It lacks details on authentication, error cases, return values, and parameter semantics, which are critical for an AI agent to invoke the tool correctly. The conciseness comes at the cost of necessary context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'specific issue in a GitHub repository,' which hints at parameters like issue number and repository identifiers, but doesn't explain the meaning of 'owner,' 'repo,' or 'issue_number' (e.g., owner as GitHub username/organization, repo as repository name, issue_number as numeric ID). This adds minimal value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get details') and resource ('specific issue in a GitHub repository'), making the purpose understandable. It distinguishes from siblings like 'list-issues' (which retrieves multiple issues) and 'update-issue' (which modifies an issue). However, it doesn't specify what details are included (e.g., title, body, comments, labels), which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when details of a specific issue are needed, but doesn't explicitly state when to use it versus alternatives like 'list-issues' for multiple issues or 'search-issues' for filtered searches. No guidance on prerequisites (e.g., authentication, repository access) or exclusions is provided, leaving usage context partially ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/piyushgIITian/github-enterprice-mcp'

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