Skip to main content
Glama
magarcia

Linear MCP Server

linear_get_project_issues

Retrieve issues from a Linear project by specifying the project ID, with options to filter by status, priority, include archived issues, and set a result limit.

Instructions

Get issues for a specific project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeArchivedNoInclude archived issues
limitNoMaximum number of issues to return (default: 50)
priorityNoFilter by priority level (0-4), where 0=no priority, 1=urgent, 4=low
projectIdYesProject ID to get issues for
statusNoFilter by issue status name

Implementation Reference

  • The main execution logic for the linear_get_project_issues tool, fetching Linear project issues with optional filters for status, priority, and archived status.
    export const linearGetProjectIssuesHandler: ToolHandler = async args => {
      const params = args as {
        projectId: string;
        includeArchived?: boolean;
        limit?: number;
        status?: string;
        priority?: number;
      };
    
      try {
        // Validate required parameters
        if (!params.projectId) {
          return {
            content: [
              {
                type: 'text',
                text: 'Error: Project ID is required',
              },
            ],
            isError: true,
          };
        }
    
        // Set up query parameters
        const queryParams: {
          first: number;
          includeArchived: boolean;
          filter?: {
            stateId?: { eq: string };
            priority?: { eq: number };
          };
        } = {
          first: params.limit || 50,
          includeArchived: params.includeArchived || false,
        };
    
        // Get the project
        const project = await linearClient.project(params.projectId);
        if (!project) {
          return {
            content: [
              {
                type: 'text',
                text: `Error: Project with ID ${params.projectId} not found`,
              },
            ],
            isError: true,
          };
        }
    
        // Get project issues
        const issuesResponse = await project.issues(queryParams);
        if (!issuesResponse || !issuesResponse.nodes) {
          return {
            content: [
              {
                type: 'text',
                text: 'Error: Failed to fetch project issues',
              },
            ],
            isError: true,
          };
        }
    
        let issues = issuesResponse.nodes;
    
        // Filter by status if provided
        if (params.status && issues.length > 0) {
          const status = params.status.toLowerCase();
          const filteredIssues = [];
    
          for (const issue of issues) {
            const state = await issue.state;
            if (state && typeof state === 'object') {
              const stateName = await state.name;
              if (stateName && stateName.toLowerCase() === status) {
                filteredIssues.push(issue);
              }
            }
          }
    
          issues = filteredIssues;
        }
    
        // Filter by priority if provided
        if (params.priority !== undefined && issues.length > 0) {
          const filteredIssues = [];
    
          for (const issue of issues) {
            const priority = await issue.priority;
            if (priority === params.priority) {
              filteredIssues.push(issue);
            }
          }
    
          issues = filteredIssues;
        }
    
        // Extract issue data
        const issueData = await Promise.all(
          issues.map(async issue => {
            const state = await issue.state;
            const assignee = await issue.assignee;
    
            return {
              id: await issue.id,
              identifier: await issue.identifier,
              title: await issue.title,
              description: await issue.description,
              state: state && typeof state === 'object' ? await state.name : null,
              assignee: assignee && typeof assignee === 'object' ? await assignee.name : null,
              priority: await issue.priority,
              url: await issue.url,
              createdAt: await issue.createdAt,
              updatedAt: await issue.updatedAt,
            };
          })
        );
    
        // Get project data
        const projectStatus = await project.status;
    
        const projectData = {
          id: project.id,
          name: project.name,
          status: projectStatus ? await projectStatus.name : null,
          issues: issueData,
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(projectData),
            },
          ],
        };
      } catch (error) {
        const errorMessage =
          error instanceof Error
            ? error.message
            : typeof error === 'string'
              ? error
              : 'Unknown error occurred';
    
        return {
          content: [
            {
              type: 'text',
              text: `Error: ${errorMessage}`,
            },
          ],
          isError: true,
        };
      }
    };
  • Tool registration using registerTool, specifying name, description, inputSchema, and handler reference.
    export const linearGetProjectIssuesTool = registerTool(
      {
        name: 'linear_get_project_issues',
        description: 'Get issues for a specific project',
        inputSchema: {
          type: 'object',
          properties: {
            projectId: {
              type: 'string',
              description: 'Project ID to get issues for',
            },
            includeArchived: {
              type: 'boolean',
              description: 'Include archived issues',
            },
            limit: {
              type: 'number',
              description: 'Maximum number of issues to return (default: 50)',
            },
            status: {
              type: 'string',
              description: 'Filter by issue status name',
            },
            priority: {
              type: 'number',
              description: 'Filter by priority level (0-4), where 0=no priority, 1=urgent, 4=low',
            },
          },
          required: ['projectId'],
        },
      },
      linearGetProjectIssuesHandler
    );
  • Input schema for validating tool arguments, defining properties and required fields.
    inputSchema: {
      type: 'object',
      properties: {
        projectId: {
          type: 'string',
          description: 'Project ID to get issues for',
        },
        includeArchived: {
          type: 'boolean',
          description: 'Include archived issues',
        },
        limit: {
          type: 'number',
          description: 'Maximum number of issues to return (default: 50)',
        },
        status: {
          type: 'string',
          description: 'Filter by issue status name',
        },
        priority: {
          type: 'number',
          description: 'Filter by priority level (0-4), where 0=no priority, 1=urgent, 4=low',
        },
      },
      required: ['projectId'],
    },
  • src/tools/index.ts:9-9 (registration)
    Import statement that loads and registers the tool during module initialization.
    import './linear_get_project_issues.js';
Behavior2/5

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

With no annotations provided, the description carries full burden but discloses minimal behavioral traits. It doesn't mention whether this is a read-only operation, if it requires authentication, rate limits, pagination behavior, or what the return format looks like. 'Get' implies a read operation, but no further details are given.

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 with zero wasted words. It's appropriately sized for a simple retrieval tool and front-loads the core purpose immediately.

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?

For a tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'issues' are in this context, how results are structured, or provide any behavioral context beyond the basic verb. The agent must rely entirely on the input schema for parameter details.

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?

Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds no additional meaning beyond implying project-scoped filtering, which is already covered by the 'projectId' parameter in the schema. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get issues for a specific project' clearly states the verb ('Get') and resource ('issues'), but it's vague about scope and doesn't distinguish from siblings like 'linear_get_team_issues' or 'linear_search_issues'. It doesn't specify whether this returns all issues, filtered issues, or paginated results.

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?

No guidance is provided on when to use this tool versus alternatives like 'linear_get_team_issues' (for team-scoped issues) or 'linear_search_issues' (for broader searches). The description implies project-specific retrieval but offers no explicit comparison or exclusion criteria.

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/magarcia/mcp-server-linearapp'

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