Skip to main content
Glama
Dsazz

JIRA MCP Server

jira_get_issue

Retrieve detailed information about a specific JIRA issue by providing its issue key to access ticket details directly within your development environment.

Instructions

Retrieves detailed information about a specific JIRA issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueKeyYes

Implementation Reference

  • GetIssueHandler class that implements the core tool logic: validates input parameters, executes the GetIssueUseCase to fetch issue data from JIRA, formats the response with IssueFormatter, and provides detailed error handling with user-friendly messages.
    export class GetIssueHandler extends BaseToolHandler<GetIssueParams, string> {
      private formatter: IssueFormatter;
    
      /**
       * Create a new GetIssueHandler with use case and validator
       *
       * @param getIssueUseCase - Use case for retrieving issue details
       * @param issueParamsValidator - Validator for issue parameters
       */
      constructor(
        private readonly getIssueUseCase: GetIssueUseCase,
        private readonly issueParamsValidator: IssueParamsValidator,
      ) {
        super("JIRA", "Get Issue");
        this.formatter = new IssueFormatter();
      }
    
      /**
       * Execute the handler logic
       * Retrieves issue details and formats them using the formatter
       *
       * @param params - Parameters for issue retrieval
       */
      protected async execute(params: GetIssueParams): Promise<string> {
        try {
          // Step 1: Validate parameters
          const validatedParams =
            this.issueParamsValidator.validateGetIssueParams(params);
          this.logger.info(`Getting JIRA issue: ${validatedParams.issueKey}`);
    
          // Step 2: Get issue using use case
          const issue = await this.getIssueUseCase.execute(validatedParams);
    
          // Step 3: Format issue using the formatter
          return this.formatter.format(issue);
        } catch (error) {
          this.logger.error(`Failed to get issue: ${error}`);
          throw this.enhanceError(error, params);
        }
      }
    
      /**
       * Enhance error messages for better user guidance
       */
      private enhanceError(error: unknown, params?: GetIssueParams): Error {
        const issueContext = params?.issueKey
          ? ` for issue ${params.issueKey}`
          : "";
    
        if (error instanceof JiraNotFoundError) {
          return new Error(
            `❌ **Issue Not Found**\n\nNo issue found${issueContext}.\n\n**Solutions:**\n- Verify the issue key is correct\n- Check if the issue exists\n- Verify you have permission to view the issue\n\n**Example:** \`jira_get_issue issueKey="PROJ-123"\``,
          );
        }
    
        if (error instanceof JiraPermissionError) {
          return new Error(
            `❌ **Permission Denied**\n\nYou don't have permission to view the issue${issueContext}.\n\n**Solutions:**\n- Check your JIRA permissions\n- Contact your JIRA administrator\n- Verify you have access to the project\n\n**Required Permissions:** Browse Projects`,
          );
        }
    
        if (error instanceof JiraApiError) {
          return new Error(
            `❌ **JIRA API Error**\n\n${error.message}\n\n**Solutions:**\n- Verify the issue key is valid (format: PROJ-123)\n- Check your JIRA connection\n- Try with a different issue\n\n**Example:** \`jira_get_issue issueKey="PROJ-123"\``,
          );
        }
    
        if (error instanceof Error) {
          return new Error(
            `❌ **Issue Retrieval Failed**\n\n${error.message}${issueContext}\n\n**Solutions:**\n- Check your parameters are valid\n- Verify your JIRA connection\n- Try with a different issue\n\n**Example:** \`jira_get_issue issueKey="PROJ-123"\``,
          );
        }
    
        return new Error(
          `❌ **Unknown Error**\n\nAn unknown error occurred during issue retrieval${issueContext}.\n\nPlease check your parameters and try again.`,
        );
      }
  • Zod schema definitions for tool input parameters: issueKeySchema (required, regex /^[A-Z]+-\d+$/) and getIssueParamsSchema (includes optional fields). The tool config uses { issueKey: issueKeyRegex }.
    export const getIssueParamsSchema = z.object({
      issueKey: issueKeySchema,
      fields: z.array(z.string()).optional(),
    });
  • Tool configuration object defining the 'jira_get_issue' tool: name, description, input params schema (issueKey), and handler function binding. Used by registry to register with MCP server.
    {
      name: "jira_get_issue",
      description: "Retrieves detailed information about a specific JIRA issue",
      params: { issueKey: issueKeySchema },
      handler: tools.jira_get_issue.handle.bind(tools.jira_get_issue),
    },
  • Tool factory creating the jira_get_issue handler wrapper that delegates calls to the instantiated GetIssueHandler.handle() method.
    jira_get_issue: {
      handle: async (args: unknown) => getIssueHandler.handle(args),
    },
  • Generic MCP server.tool() registration call that registers the jira_get_issue tool using the config from issue-tools.config.ts.
    server.tool(
      toolName,
      config.description,
      config.params,
      adaptHandler(config.handler),
    );
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'retrieves' implies a read-only operation, it doesn't specify authentication requirements, rate limits, error conditions, or what 'detailed information' includes (e.g., fields returned, format). This leaves significant gaps for a tool that likely interacts with an external API.

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 that gets straight to the point with no wasted words. It's appropriately sized for a simple retrieval tool and front-loads the core functionality.

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?

For a tool with no annotations, no output schema, and minimal parameter documentation, the description is insufficient. It doesn't explain what 'detailed information' includes, how results are structured, or any behavioral constraints. Given the complexity of JIRA issues and the lack of structured documentation, this leaves too many unknowns for effective tool use.

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

Parameters3/5

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

The description mentions 'a specific JIRA issue' which implies the issueKey parameter identifies which issue to retrieve, but doesn't explain the parameter's format or semantics beyond what the schema's pattern already provides. With 0% schema description coverage, the description adds minimal value over 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 action ('retrieves detailed information') and target resource ('a specific JIRA issue'), making the purpose immediately understandable. It distinguishes this tool from siblings like jira_create_issue (creation) and jira_update_issue (modification), though it doesn't explicitly differentiate from jira_get_issue_comments which retrieves only comments.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like jira_get_assigned_issues (for user-specific issues) or search_jira_issues (for broader queries). It simply states what the tool does without context about appropriate use cases or prerequisites.

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/Dsazz/mcp-jira'

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