Skip to main content
Glama
tiovikram

Linear MCP Server

by tiovikram

get_issue

Retrieve detailed information about a specific Linear issue by providing its ID to access status, assignees, and related project data.

Instructions

Get detailed information about a specific issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYesIssue ID

Implementation Reference

  • The main handler for the 'get_issue' tool. It retrieves the issue by ID using LinearClient, fetches related entities (state, assignee, etc.), constructs a detailed issue object, extracts embedded images and image attachments, and returns a formatted JSON response.
    case "get_issue": {
      const args = request.params.arguments as unknown as GetIssueArgs;
      if (!args?.issueId) {
        throw new Error("Issue ID is required");
      }
    
      const issue = await linearClient.issue(args.issueId);
      if (!issue) {
        throw new Error(`Issue ${args.issueId} not found`);
      }
    
      try {
        const [
          state,
          assignee,
          creator,
          team,
          project,
          parent,
          cycle,
          labels,
          comments,
          attachments,
        ] = await Promise.all([
          issue.state,
          issue.assignee,
          issue.creator,
          issue.team,
          issue.project,
          issue.parent,
          issue.cycle,
          issue.labels(),
          issue.comments(),
          issue.attachments(),
        ]);
    
        const issueDetails: {
          id: string;
          identifier: string;
          title: string;
          description: string | undefined;
          priority: number;
          priorityLabel: string;
          status: string;
          url: string;
          createdAt: Date;
          updatedAt: Date;
          startedAt: Date | null;
          completedAt: Date | null;
          canceledAt: Date | null;
          dueDate: string | null;
          assignee: { id: string; name: string; email: string } | null;
          creator: { id: string; name: string; email: string } | null;
          team: { id: string; name: string; key: string } | null;
          project: { id: string; name: string; state: string } | null;
          parent: { id: string; title: string; identifier: string } | null;
          cycle: { id: string; name: string; number: number } | null;
          labels: Array<{ id: string; name: string; color: string }>;
          comments: Array<{ id: string; body: string; createdAt: Date }>;
          attachments: Array<{ id: string; title: string; url: string }>;
          embeddedImages: Array<{ url: string; analysis: string }>;
          estimate: number | null;
          customerTicketCount: number;
          previousIdentifiers: string[];
          branchName: string;
          archivedAt: Date | null;
          autoArchivedAt: Date | null;
          autoClosedAt: Date | null;
          trashed: boolean;
        } = {
          id: issue.id,
          identifier: issue.identifier,
          title: issue.title,
          description: issue.description,
          priority: issue.priority,
          priorityLabel: issue.priorityLabel,
          status: state ? await state.name : "Unknown",
          url: issue.url,
          createdAt: issue.createdAt,
          updatedAt: issue.updatedAt,
          startedAt: issue.startedAt || null,
          completedAt: issue.completedAt || null,
          canceledAt: issue.canceledAt || null,
          dueDate: issue.dueDate,
          assignee: assignee
            ? {
                id: assignee.id,
                name: assignee.name,
                email: assignee.email,
              }
            : null,
          creator: creator
            ? {
                id: creator.id,
                name: creator.name,
                email: creator.email,
              }
            : null,
          team: team
            ? {
                id: team.id,
                name: team.name,
                key: team.key,
              }
            : null,
          project: project
            ? {
                id: project.id,
                name: project.name,
                state: project.state,
              }
            : null,
          parent: parent
            ? {
                id: parent.id,
                title: parent.title,
                identifier: parent.identifier,
              }
            : null,
          cycle:
            cycle && cycle.name
              ? {
                  id: cycle.id,
                  name: cycle.name,
                  number: cycle.number,
                }
              : null,
          labels: await Promise.all(
            labels.nodes.map(async (label: any) => ({
              id: label.id,
              name: label.name,
              color: label.color,
            }))
          ),
          comments: await Promise.all(
            comments.nodes.map(async (comment: any) => ({
              id: comment.id,
              body: comment.body,
              createdAt: comment.createdAt,
            }))
          ),
          attachments: await Promise.all(
            attachments.nodes.map(async (attachment: any) => ({
              id: attachment.id,
              title: attachment.title,
              url: attachment.url,
            }))
          ),
          embeddedImages: [],
          estimate: issue.estimate || null,
          customerTicketCount: issue.customerTicketCount || 0,
          previousIdentifiers: issue.previousIdentifiers || [],
          branchName: issue.branchName || "",
          archivedAt: issue.archivedAt || null,
          autoArchivedAt: issue.autoArchivedAt || null,
          autoClosedAt: issue.autoClosedAt || null,
          trashed: issue.trashed || false,
        };
    
        // Extract embedded images from description
        const imageMatches =
          issue.description?.match(/!\[.*?\]\((.*?)\)/g) || [];
        if (imageMatches.length > 0) {
          issueDetails.embeddedImages = imageMatches.map((match) => {
            const url = (match as string).match(/\((.*?)\)/)?.[1] || "";
            return {
              url,
              analysis: "Image analysis would go here", // Replace with actual image analysis if available
            };
          });
        }
    
        // Add image analysis for attachments if they are images
        issueDetails.attachments = await Promise.all(
          attachments.nodes
            .filter((attachment: any) =>
              attachment.url.match(/\.(jpg|jpeg|png|gif|webp)$/i)
            )
            .map(async (attachment: any) => ({
              id: attachment.id,
              title: attachment.title,
              url: attachment.url,
              analysis: "Image analysis would go here", // Replace with actual image analysis if available
            }))
        );
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(issueDetails, null, 2),
            },
          ],
        };
      } catch (error: any) {
        console.error("Error processing issue details:", error);
        throw new Error(`Failed to process issue details: ${error.message}`);
      }
    }
  • TypeScript type definition for the input arguments of the get_issue tool.
    type GetIssueArgs = {
      issueId: string;
    };
  • JSON schema definition for the input parameters of the get_issue tool, as exposed in the listTools response.
    inputSchema: {
      type: "object",
      properties: {
        issueId: {
          type: "string",
          description: "Issue ID",
        },
      },
      required: ["issueId"],
    },
  • src/index.ts:204-217 (registration)
    Registration of the get_issue tool in the listTools handler response, including name, description, and input schema.
    {
      name: "get_issue",
      description: "Get detailed information about a specific issue",
      inputSchema: {
        type: "object",
        properties: {
          issueId: {
            type: "string",
            description: "Issue ID",
          },
        },
        required: ["issueId"],
      },
    },
  • src/index.ts:46-54 (registration)
    Server capabilities declaration indicating support for the get_issue tool.
    tools: {
      create_issue: true,
      list_issues: true,
      update_issue: true,
      list_teams: true,
      list_projects: true,
      search_issues: true,
      get_issue: true,
    },
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 gets detailed information, which implies a read-only operation, but doesn't specify aspects like authentication requirements, rate limits, error handling, or what 'detailed information' entails (e.g., fields returned, format). This leaves significant gaps for a tool with no annotation coverage.

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

Conciseness4/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 unnecessary words. It's appropriately sized for a simple tool, though it could be slightly more informative by front-loading key details like the parameter requirement or sibling differentiation.

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 (one parameter, no output schema, no annotations), the description is minimally adequate but incomplete. It covers the basic purpose but lacks usage guidelines, behavioral details, and output information, which are important for an agent to invoke it correctly in context with siblings like 'list_issues'.

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. The description adds no additional meaning beyond what the schema provides, such as examples or constraints on the ID format. Since schema coverage is high, 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 ('Get') and resource ('detailed information about a specific issue'), making it easy to understand what it does. However, it doesn't explicitly distinguish it from sibling tools like 'list_issues' or 'search_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 that this is for retrieving a single issue by ID, as opposed to 'list_issues' for multiple issues or 'search_issues' for filtered searches, leaving the agent to infer usage from context or tool names 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/tiovikram/linear-mcp'

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