Skip to main content
Glama
magarcia

Linear MCP Server

linear_get_project

Retrieve detailed information about a specific Linear project using its unique project ID to access project data and status.

Instructions

Get details about a specific project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID to get details for

Implementation Reference

  • The main handler function that executes the tool logic: validates projectId, fetches project and related entities (status, team, creator, lead) using linearClient, constructs projectData object, and returns JSON string or error.
    export const linearGetProjectHandler: ToolHandler = async args => {
      const params = args as {
        projectId: string;
      };
    
      try {
        // Validate required parameters
        if (!params.projectId) {
          return {
            content: [
              {
                type: 'text',
                text: 'Error: Project ID is required',
              },
            ],
            isError: true,
          };
        }
    
        // 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,
          };
        }
    
        // Fetch related entities
        const status = await project.status;
        // Teams is a connection, not a single team - need to fetch the first one if exists
        const teamsConnection = await project.teams({ first: 1 });
        const team = teamsConnection?.nodes?.[0];
        const creator = await project.creator;
        // Project lead is a single user, not a connection
        const lead = await project.lead;
    
        // Extract project data
        const projectData = {
          id: project.id,
          name: project.name,
          description: project.description,
          content: project.content,
          url: project.url,
          color: project.color,
          icon: project.icon,
          status: status
            ? {
                id: await status.id,
                name: await status.name,
                color: await status.color,
                type: await status.type,
              }
            : null,
          team: team
            ? {
                id: await team.id,
                name: await team.name,
                key: await team.key,
              }
            : null,
          creator: creator
            ? {
                id: await creator.id,
                name: await creator.name,
                displayName: await creator.displayName,
              }
            : null,
          lead: lead
            ? {
                id: await lead.id,
                name: await lead.name,
                displayName: await lead.displayName,
              }
            : null,
          progress: project.progress,
          startDate: project.startDate,
          targetDate: project.targetDate,
          createdAt: project.createdAt,
          updatedAt: project.updatedAt,
          completedAt: project.completedAt,
          canceledAt: project.canceledAt,
          archivedAt: project.archivedAt,
          priority: project.priority,
          slugId: project.slugId,
          sortOrder: project.sortOrder,
        };
    
        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,
        };
      }
    };
  • Registers the 'linear_get_project' tool with its description, input schema (requiring projectId), and links to the handler function.
    export const linearGetProjectTool = registerTool(
      {
        name: 'linear_get_project',
        description: 'Get details about a specific project',
        inputSchema: {
          type: 'object',
          properties: {
            projectId: {
              type: 'string',
              description: 'Project ID to get details for',
            },
          },
          required: ['projectId'],
        },
      },
      linearGetProjectHandler
    );
  • Input schema definition for the tool, specifying projectId as required string.
    inputSchema: {
      type: 'object',
      properties: {
        projectId: {
          type: 'string',
          description: 'Project ID to get details for',
        },
      },
      required: ['projectId'],
    },
  • Imports the linear_get_project tool module, ensuring it is registered in the tools index.
    import './linear_get_project.js';
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 it 'gets details,' implying a read-only operation, but doesn't specify what details are returned, potential errors (e.g., invalid project ID), authentication needs, rate limits, or data format. This leaves significant gaps for an agent to understand the tool's behavior.

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 no wasted words. It's front-loaded with the core action and resource, making it easy to scan and understand quickly.

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's complexity (a read operation with one parameter) and lack of annotations and output schema, the description is incomplete. It doesn't explain what 'details' include, potential response structures, or error handling, leaving the agent with insufficient context for effective use.

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 'projectId' clearly documented. The description adds no additional meaning beyond the schema, such as format examples or context about where to obtain the ID. This meets the baseline of 3 since the schema does the heavy lifting.

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 ('details about a specific project'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'linear_get_projects' (plural) or 'linear_get_project_issues', which might retrieve related but different data.

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 prerequisites (e.g., needing a project ID), exclusions, or comparisons to siblings like 'linear_get_projects' for listing projects or 'linear_get_project_issues' for project-specific issues.

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