Skip to main content
Glama

get_issue

Retrieve Jira issue details by ID or key to access specific fields, properties, and expanded information for project tracking.

Instructions

Retrieve details about an issue by its ID or key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdOrKeyYesID or key of the issue
fieldsNoFields to include in the response
expandNoAdditional information to include in the response
propertiesNoProperties to include in the response
failFastNoFail quickly on errors

Implementation Reference

  • Handler that executes the get_issue tool by fetching issue details from Jira REST API /rest/api/2/issue/{issueIdOrKey} with optional query parameters for fields, expand, properties, and failFast.
    } else if (name === "get_issue") {
      const { issueIdOrKey, fields, expand, properties, failFast } = args;
      try {
        const queryParams = new URLSearchParams();
    
        if (fields) queryParams.append("fields", fields.join(","));
        if (expand) queryParams.append("expand", expand);
        if (properties) queryParams.append("properties", properties.join(","));
        if (failFast !== undefined)
          queryParams.append("failFast", String(failFast));
    
        const response = await fetch(
          `${JIRA_INSTANCE_URL}/rest/api/2/issue/${issueIdOrKey}?${queryParams.toString()}`,
          {
            method: "GET",
            headers: {
              "Content-Type": "application/json",
              Authorization: `Basic ${Buffer.from(`${JIRA_USER_EMAIL}:${JIRA_API_KEY}`).toString("base64")}`,
            },
          },
        );
    
        if (!response.ok) {
          throw new Error(`Jira API Error: ${response.statusText}`);
        }
    
        const data = await response.json();
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(data, null, 2), // Format JSON response
            },
          ],
        };
      } catch (error) {
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Error: ${error.message}`,
            },
          ],
        };
      }
    }
  • Input schema for the get_issue tool, defining required issueIdOrKey and optional fields, expand, properties, failFast.
    inputSchema: {
      type: "object",
      properties: {
        issueIdOrKey: {
          type: "string",
          description: "ID or key of the issue",
        },
        fields: {
          type: "array",
          items: { type: "string" },
          description: "Fields to include in the response",
        },
        expand: {
          type: "string",
          description: "Additional information to include in the response",
        },
        properties: {
          type: "array",
          items: { type: "string" },
          description: "Properties to include in the response",
        },
        failFast: {
          type: "boolean",
          description: "Fail quickly on errors",
          default: false,
        },
      },
      required: ["issueIdOrKey"],
    },
  • index.js:68-100 (registration)
    Registration of the get_issue tool in the ListTools response, including name, description, and input schema.
    {
      name: "get_issue",
      description: "Retrieve details about an issue by its ID or key.",
      inputSchema: {
        type: "object",
        properties: {
          issueIdOrKey: {
            type: "string",
            description: "ID or key of the issue",
          },
          fields: {
            type: "array",
            items: { type: "string" },
            description: "Fields to include in the response",
          },
          expand: {
            type: "string",
            description: "Additional information to include in the response",
          },
          properties: {
            type: "array",
            items: { type: "string" },
            description: "Properties to include in the response",
          },
          failFast: {
            type: "boolean",
            description: "Fail quickly on errors",
            default: false,
          },
        },
        required: ["issueIdOrKey"],
      },
    },
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, implying a read-only operation, but doesn't mention error handling (e.g., what happens if the ID/key is invalid), rate limits, authentication needs, or response format. This leaves significant gaps for an agent to understand how to use it 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, clear sentence that efficiently conveys the core purpose without any unnecessary words. It's front-loaded and easy to parse, making it highly concise and well-structured for quick understanding.

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 5 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what details are retrieved, how to handle optional parameters like 'fields' or 'expand', or what the response looks like. For a tool with multiple parameters and no structured output information, more context is needed to guide proper usage.

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, so parameters are well-documented in the schema itself. The description adds no additional meaning beyond implying retrieval by 'ID or key', which aligns with the 'issueIdOrKey' parameter but doesn't elaborate on usage. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

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 tool's purpose with a specific verb ('Retrieve') and resource ('details about an issue'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from the sibling tool 'jql_search', which likely serves a different purpose (searching vs. retrieving by ID/key).

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 'jql_search'. It mentions retrieving by 'ID or key', which implies a specific use case, but doesn't clarify when to choose this over a search tool or address any prerequisites or exclusions.

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

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