Skip to main content
Glama
wkoutre

Linear MCP Server

by wkoutre

linear_getProjectIssues

Retrieve all issues from a specific Linear project to track progress, manage tasks, and monitor project status.

Instructions

Get all issues associated with a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesID of the project to get issues for
limitNoMaximum number of issues to return (default: 25)

Implementation Reference

  • Handler function that executes the tool logic: validates input args using isGetProjectIssuesArgs and calls linearService.getProjectIssues(projectId, limit).
    export function handleGetProjectIssues(linearService: LinearService) {
      return async (args: unknown) => {
        try {
          if (!isGetProjectIssuesArgs(args)) {
            throw new Error("Invalid arguments for getProjectIssues");
          }
          
          return await linearService.getProjectIssues(args.projectId, args.limit);
        } catch (error) {
          logError("Error getting project issues", error);
          throw error;
        }
      };
    } 
  • MCP tool definition with input/output schemas for linear_getProjectIssues.
    export const getProjectIssuesToolDefinition: MCPToolDefinition = {
      name: "linear_getProjectIssues",
      description: "Get all issues associated with a project",
      input_schema: {
        type: "object",
        properties: {
          projectId: {
            type: "string",
            description: "ID of the project to get issues for",
          },
          limit: {
            type: "number",
            description: "Maximum number of issues to return (default: 25)",
          },
        },
        required: ["projectId"],
      },
      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" },
            team: { type: "object" },
            assignee: { type: "object" },
            url: { type: "string" }
          }
        }
      }
    }; 
  • Registration of the linear_getProjectIssues tool handler in the registerToolHandlers function.
    linear_getProjectIssues: handleGetProjectIssues(linearService),
  • Type guard function for validating the input arguments of the linear_getProjectIssues tool.
    export function isGetProjectIssuesArgs(args: unknown): args is {
      projectId: string;
      limit?: number;
    } {
      return (
        typeof args === "object" &&
        args !== null &&
        "projectId" in args &&
        typeof (args as { projectId: string }).projectId === "string" &&
        (!("limit" in args) || typeof (args as { limit: number }).limit === "number")
      );
    }

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/wkoutre/linear-mcp-server'

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