Skip to main content
Glama

Get Issue Details

get_issue_details

Retrieve comprehensive information about a specific Jira issue by providing its issue key to access details like status, assignee, and description.

Instructions

Get full details of a specific Jira issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueKeyYesThe issue key (e.g., "PROJ-123")

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNo
errorNo
parentNo
statusNo
createdNo
projectNo
summaryNo
updatedNo
assigneeNo
commentsNo
priorityNo
reporterNo
descriptionNo

Implementation Reference

  • Core handler function that executes the tool logic: fetches detailed Jira issue data via API, processes comments (last 5), extracts plain text from ADF format, handles parent issue, and returns structured JiraIssue object.
    export async function getIssueDetails(issueKey: string): Promise<JiraIssue> {
      const fields = ['summary', 'status', 'priority', 'updated', 'description', 'assignee', 'reporter', 'created', 'comment', 'project', 'parent'];
      const params = new URLSearchParams({
        fields: fields.join(','),
      });
    
      const response = await jiraFetch<{
        key: string;
        fields: {
          summary: string;
          status: { name: string };
          priority: { name: string };
          updated: string;
          description?: unknown;
          assignee?: { displayName: string; accountId: string };
          reporter?: { displayName: string; accountId: string };
          created: string;
          comment?: {
            comments: Array<{
              id: string;
              author: { displayName: string };
              body: unknown;
              created: string;
              updated: string;
            }>;
          };
          project?: {
            key: string;
            name: string;
          };
          parent?: {
            key: string;
            fields: {
              summary: string;
              status: { name: string };
              priority: { name: string };
              issuetype: { name: string };
            };
          };
        };
      }>(`/issue/${issueKey}?${params.toString()}`);
    
      const comments: JiraComment[] = response.fields.comment?.comments.slice(-5).map((c) => ({
        id: c.id,
        author: c.author.displayName,
        body: extractTextFromADF(c.body),
        created: c.created,
        updated: c.updated,
      })) || [];
    
      // Build parent object if present
      const parent: JiraIssueParent | undefined = response.fields.parent
        ? {
            key: response.fields.parent.key,
            summary: response.fields.parent.fields.summary,
            status: response.fields.parent.fields.status.name,
            priority: response.fields.parent.fields.priority?.name || 'None',
            issueType: response.fields.parent.fields.issuetype.name,
          }
        : undefined;
    
      return {
        key: response.key,
        summary: response.fields.summary,
        status: response.fields.status.name,
        priority: response.fields.priority?.name || 'None',
        updated: response.fields.updated,
        description: extractTextFromADF(response.fields.description),
        assignee: response.fields.assignee?.displayName,
        reporter: response.fields.reporter?.displayName,
        created: response.fields.created,
        comments,
        project: response.fields.project
          ? { key: response.fields.project.key, name: response.fields.project.name }
          : undefined,
        parent,
      };
    }
  • src/index.ts:349-413 (registration)
    MCP tool registration for 'get_issue_details', including schemas and thin wrapper handler that validates input and calls the core getIssueDetails function.
    server.registerTool(
      'get_issue_details',
      {
        title: 'Get Issue Details',
        description: 'Get full details of a specific Jira issue',
        inputSchema: {
          issueKey: z.string().describe('The issue key (e.g., "PROJ-123")'),
        },
        outputSchema: {
          key: z.string().optional(),
          summary: z.string().optional(),
          description: z.string().optional(),
          status: z.string().optional(),
          priority: z.string().optional(),
          assignee: z.string().optional(),
          reporter: z.string().optional(),
          created: z.string().optional(),
          updated: z.string().optional(),
          comments: z.array(z.object({
            id: z.string(),
            author: z.string(),
            body: z.string(),
            created: z.string(),
            updated: z.string(),
          })).optional(),
          project: z.object({
            key: z.string(),
            name: z.string(),
          }).optional(),
          parent: z.object({
            key: z.string(),
            summary: z.string(),
            status: z.string(),
            priority: z.string(),
            issueType: z.string(),
          }).optional(),
          error: z.object({
            message: z.string(),
            statusCode: z.number().optional(),
            details: z.unknown().optional(),
          }).optional(),
        },
      },
      async ({ issueKey }) => {
        try {
          if (!issueKey || !issueKey.trim()) {
            throw new Error('issueKey is required');
          }
    
          const issue = await getIssueDetails(issueKey);
          const output = { ...issue };
          return {
            content: [{ type: 'text', text: JSON.stringify(output, null, 2) }],
            structuredContent: output,
          };
        } catch (error) {
          const errOutput = formatError(error);
          return {
            content: [{ type: 'text', text: JSON.stringify(errOutput, null, 2) }],
            structuredContent: errOutput,
            isError: true,
          };
        }
      }
    );
  • TypeScript interface defining the structure of the JiraIssue output from getIssueDetails, used for type safety and matching the tool's outputSchema.
    export interface JiraIssue {
      key: string;
      summary: string;
      status: string;
      priority: string;
      updated: string;
      description?: string;
      assignee?: string;
      reporter?: string;
      created?: string;
      comments?: JiraComment[];
      project?: {
        key: string;
        name: string;
      };
      parent?: JiraIssueParent;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves details but doesn't specify what 'full details' includes (e.g., fields, attachments, comments), whether it's a read-only operation, authentication requirements, rate limits, or error handling. This leaves significant gaps in understanding the tool's behavior beyond basic purpose.

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 front-loads the core purpose without any wasted words. It directly communicates the tool's function in a clear and structured manner, making it easy for an agent to parse and understand quickly.

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

Completeness3/5

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

Given the tool's low complexity (single required parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and incomplete behavioral details, it doesn't fully compensate for the lack of structured safety or operational context, leaving room for improvement in guiding the agent.

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 'issueKey' parameter clearly documented in the schema itself. The description adds no additional parameter semantics beyond implying a single issue is targeted, so it meets the baseline of 3 where the schema does the heavy lifting without extra value from the description.

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 ('Get full details') and resource ('a specific Jira issue'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'search_issues' or 'get_my_issues', which might also retrieve issue information but with different scopes or filters.

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. It doesn't mention prerequisites (e.g., needing an issue key), exclusions, or comparisons to siblings like 'search_issues' for broader queries or 'get_my_issues' for user-specific issues, leaving the agent to infer usage from context alone.

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

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