Skip to main content
Glama

linear_getIssues

Retrieve recent issues from Linear project management to track tasks and monitor progress. Specify limit to control results.

Instructions

Get a list of recent issues from Linear

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of issues to return (default: 10)

Implementation Reference

  • The main handler function for the linear_getIssues tool. Validates input using type guard and delegates to LinearService.getIssues.
    export function handleGetIssues(linearService: LinearService) {
      return async (args: unknown) => {
        try {
          if (!isGetIssuesArgs(args)) {
            throw new Error('Invalid arguments for getIssues');
          }
    
          return await linearService.getIssues(args.limit);
        } catch (error) {
          logError('Error getting issues', error);
          throw error;
        }
      };
    }
  • Core service method that queries the Linear GraphQL API for recent issues, resolves relationships (team, assignee, etc.), and formats the output matching the tool schema.
    async getIssues(limit = 25) {
      const issues = await this.client.issues({ first: limit });
      return Promise.all(
        issues.nodes.map(async (issue) => {
          // For relations, we need to fetch the objects
          const teamData = issue.team ? await issue.team : null;
          const assigneeData = issue.assignee ? await issue.assignee : null;
          const projectData = issue.project ? await issue.project : null;
          const cycleData = issue.cycle ? await issue.cycle : null;
          const parentData = issue.parent ? await issue.parent : null;
    
          // Get labels
          const labels = await issue.labels();
          const labelsList = labels.nodes.map((label) => ({
            id: label.id,
            name: label.name,
            color: label.color,
          }));
    
          return {
            id: issue.id,
            title: issue.title,
            description: issue.description,
            state: issue.state,
            priority: issue.priority,
            estimate: issue.estimate,
            dueDate: issue.dueDate,
            team: teamData
              ? {
                  id: teamData.id,
                  name: teamData.name,
                }
              : null,
            assignee: assigneeData
              ? {
                  id: assigneeData.id,
                  name: assigneeData.name,
                }
              : null,
            project: projectData
              ? {
                  id: projectData.id,
                  name: projectData.name,
                }
              : null,
            cycle: cycleData
              ? {
                  id: cycleData.id,
                  name: cycleData.name,
                }
              : null,
            parent: parentData
              ? {
                  id: parentData.id,
                  title: parentData.title,
                }
              : null,
            labels: labelsList,
            sortOrder: issue.sortOrder,
            createdAt: issue.createdAt,
            updatedAt: issue.updatedAt,
            url: issue.url,
          };
        }),
      );
    }
  • Input/output schema definition for the linear_getIssues tool.
    export const getIssuesToolDefinition: MCPToolDefinition = {
      name: 'linear_getIssues',
      description: 'Get a list of recent issues from Linear',
      input_schema: {
        type: 'object',
        properties: {
          limit: {
            type: 'number',
            description: 'Maximum number of issues to return (default: 10)',
          },
        },
      },
      output_schema: {
        type: 'array',
        items: {
          type: 'object',
          properties: {
            id: { type: 'string' },
            identifier: { type: 'string' },
            title: { type: 'string' },
            description: { type: 'string' },
            state: { type: 'string' },
            priority: { type: 'number' },
            estimate: { type: 'number' },
            dueDate: { type: 'string' },
            team: { type: 'object' },
            assignee: { type: 'object' },
            project: { type: 'object' },
            cycle: { type: 'object' },
            parent: { type: 'object' },
            labels: {
              type: 'array',
              items: {
                type: 'object',
                properties: {
                  id: { type: 'string' },
                  name: { type: 'string' },
                  color: { type: 'string' },
                },
              },
            },
            sortOrder: { type: 'number' },
            createdAt: { type: 'string' },
            updatedAt: { type: 'string' },
            url: { type: 'string' },
          },
        },
      },
    };
  • Registration of all tool handlers, including linear_getIssues mapped to handleGetIssues.
    export function registerToolHandlers(linearService: LinearService) {
      return {
        // User tools
        linear_getViewer: handleGetViewer(linearService),
        linear_getOrganization: handleGetOrganization(linearService),
        linear_getUsers: handleGetUsers(linearService),
        linear_getLabels: handleGetLabels(linearService),
    
        // Team tools
        linear_getTeams: handleGetTeams(linearService),
        linear_getWorkflowStates: handleGetWorkflowStates(linearService),
    
        // Project tools
        linear_getProjects: handleGetProjects(linearService),
        linear_createProject: handleCreateProject(linearService),
    
        // Project Management tools
        linear_updateProject: handleUpdateProject(linearService),
        linear_addIssueToProject: handleAddIssueToProject(linearService),
        linear_getProjectIssues: handleGetProjectIssues(linearService),
    
        // Cycle Management tools
        linear_getCycles: handleGetCycles(linearService),
        linear_getActiveCycle: handleGetActiveCycle(linearService),
        linear_addIssueToCycle: handleAddIssueToCycle(linearService),
    
        // Initiative Management tools
        linear_getInitiatives: getInitiativesHandler(linearService),
        linear_getInitiativeById: getInitiativeByIdHandler(linearService),
        linear_createInitiative: createInitiativeHandler(linearService),
        linear_updateInitiative: updateInitiativeHandler(linearService),
        linear_archiveInitiative: archiveInitiativeHandler(linearService),
        linear_unarchiveInitiative: unarchiveInitiativeHandler(linearService),
        linear_deleteInitiative: deleteInitiativeHandler(linearService),
        linear_getInitiativeProjects: getInitiativeProjectsHandler(linearService),
        linear_addProjectToInitiative: addProjectToInitiativeHandler(linearService),
        linear_removeProjectFromInitiative: removeProjectFromInitiativeHandler(linearService),
    
        // Issue tools
        linear_getIssues: handleGetIssues(linearService),
        linear_getIssueById: handleGetIssueById(linearService),
        linear_searchIssues: handleSearchIssues(linearService),
        linear_createIssue: handleCreateIssue(linearService),
        linear_updateIssue: handleUpdateIssue(linearService),
        linear_createComment: handleCreateComment(linearService),
        linear_addIssueLabel: handleAddIssueLabel(linearService),
        linear_removeIssueLabel: handleRemoveIssueLabel(linearService),
    
        // New Issue Management tools
        linear_assignIssue: handleAssignIssue(linearService),
        linear_subscribeToIssue: handleSubscribeToIssue(linearService),
        linear_convertIssueToSubtask: handleConvertIssueToSubtask(linearService),
        linear_createIssueRelation: handleCreateIssueRelation(linearService),
        linear_archiveIssue: handleArchiveIssue(linearService),
        linear_setIssuePriority: handleSetIssuePriority(linearService),
        linear_transferIssue: handleTransferIssue(linearService),
        linear_duplicateIssue: handleDuplicateIssue(linearService),
        linear_getIssueHistory: handleGetIssueHistory(linearService),
    
        // Comment Management tools
        linear_getComments: handleGetComments(linearService),
      };
    }
  • src/index.ts:44-56 (registration)
    Top-level MCP server registration where tool handlers are dynamically invoked based on request name.
      handleRequest: async (req: { name: string; args: unknown }) => {
        const handlers = registerToolHandlers(linearService);
        const toolName = req.name;
    
        if (toolName in handlers) {
          // Use a type assertion here since we know the tool name is valid
          const handler = handlers[toolName as keyof typeof handlers];
          return await handler(req.args);
        } else {
          throw new Error(`Unknown tool: ${toolName}`);
        }
      },
    });
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 states this is a read operation ('Get'), but doesn't mention authentication requirements, rate limits, pagination behavior, what 'recent' means (timeframe or sorting), or the response format. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 zero wasted words. It's appropriately sized for a simple list operation and front-loads the core purpose immediately. Every word earns its place in this minimal but complete statement of function.

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 tool has no annotations and no output schema, the description is incomplete for proper agent usage. While concise, it doesn't address critical context like authentication needs, rate limits, response format, what 'recent' means operationally, or how this differs from similar tools. For a read operation with zero structured metadata, the description should provide more behavioral 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 (the 'limit' parameter is fully documented in the schema), so the baseline is 3. The description doesn't add any parameter information beyond what's in the schema - it doesn't explain default behavior when limit isn't specified or provide context about typical limit values. The description adds no value beyond the schema's parameter documentation.

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 resource ('list of recent issues from Linear'), making the purpose immediately understandable. It distinguishes from siblings like linear_getIssueById (single issue) and linear_searchIssues (filtered search), though it doesn't explicitly mention these distinctions. The phrase 'recent issues' provides useful scope context.

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 when to choose linear_getIssues over linear_searchIssues (for filtered searches) or linear_getIssueById (for specific issues), nor does it provide any context about prerequisites, permissions, or typical use cases. The agent must infer usage from the name 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/tacticlaunch/mcp-linear'

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