Skip to main content
Glama
cosmix

JIRA MCP Server

by cosmix

get_issue

Retrieve detailed JIRA issue information including comments by providing the issue ID or key to access specific project data.

Instructions

Get detailed information about a specific JIRA issue including comments

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYesThe ID or key of the JIRA issue

Implementation Reference

  • src/index.ts:115-130 (registration)
    Registration of the get_issue MCP tool, including its name, description, and input schema requiring an issueId string.
    {
      name: "get_issue",
      description:
        "Get detailed information about a specific JIRA issue including comments",
      inputSchema: {
        type: "object",
        properties: {
          issueId: {
            type: "string",
            description: "The ID or key of the JIRA issue",
          },
        },
        required: ["issueId"],
        additionalProperties: false,
      },
    },
  • MCP tool handler for get_issue: validates the issueId argument and calls the JiraApiService to fetch the issue with comments, then returns JSON stringified response.
    case "get_issue": {
      if (!args.issueId || typeof args.issueId !== "string") {
        throw new McpError(
          ErrorCode.InvalidParams,
          "Issue ID is required",
        );
      }
      const response = await this.jiraApi.getIssueWithComments(
        args.issueId,
      );
      return {
        content: [
          { type: "text", text: JSON.stringify(response, null, 2) },
        ],
      };
    }
  • Core helper function implementing the logic to retrieve a JIRA issue with comments: fetches issue and comments via API, cleans data, extracts mentions from ADF content, enriches with epic details.
    async getIssueWithComments(issueId: string): Promise<CleanJiraIssue> {
      const params = new URLSearchParams({
        fields: [
          "id",
          "key",
          "summary",
          "description",
          "status",
          "created",
          "updated",
          "parent",
          "subtasks",
          "customfield_10014",
          "issuelinks",
        ].join(","),
        expand: "names,renderedFields",
      });
    
      let issueData, commentsData;
      try {
        [issueData, commentsData] = await Promise.all([
          this.fetchJson<any>(`/rest/api/3/issue/${issueId}?${params}`),
          this.fetchJson<any>(`/rest/api/3/issue/${issueId}/comment`),
        ]);
      } catch (error: any) {
        if (error instanceof Error && error.message.includes("(Status: 404)")) {
          throw new Error(`Issue not found: ${issueId}`);
        }
    
        throw error;
      }
    
      const issue = this.cleanIssue(issueData);
      const comments = commentsData.comments.map((comment: any) =>
        this.cleanComment(comment)
      );
    
      const commentMentions = comments.flatMap(
        (comment: CleanComment) => comment.mentions
      );
      issue.relatedIssues = [...issue.relatedIssues, ...commentMentions];
    
      issue.comments = comments;
    
      if (issue.epicLink) {
        try {
          const epicData = await this.fetchJson<any>(
            `/rest/api/3/issue/${issue.epicLink.key}?fields=summary`
          );
          issue.epicLink.summary = epicData.fields?.summary;
        } catch (error) {
          console.error("Failed to fetch epic details:", error);
        }
      }
    
      return issue;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions retrieving 'detailed information' and 'comments', but fails to specify critical behaviors like whether this is a read-only operation, if it requires authentication, rate limits, error handling, or the format of returned data. This leaves significant gaps for an AI agent to understand how to invoke it safely and effectively.

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 directly states the tool's purpose without unnecessary words. It is 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 of a JIRA issue retrieval tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits, error cases, and the structure of returned data (e.g., what 'detailed information' includes beyond comments), which are essential for effective tool use in this context.

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 input schema has 100% description coverage, with the single parameter 'issueId' clearly documented as 'The ID or key of the JIRA issue'. The description adds no additional semantic context beyond this, such as examples or constraints, so it meets the baseline score of 3 where the schema does the heavy lifting.

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' and the resource 'detailed information about a specific JIRA issue including comments', making the purpose understandable. However, it doesn't explicitly differentiate this tool from sibling tools like 'search_issues' or 'get_epic_children', which might also retrieve issue information in different contexts.

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 such as 'search_issues' (for multiple issues) or 'get_epic_children' (for related issues). It lacks explicit instructions on prerequisites, context, or exclusions, leaving usage unclear relative to siblings.

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

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