Skip to main content
Glama
wkoutre

Linear MCP Server

by wkoutre

linear_getProjects

Retrieve a list of projects from Linear's project management system to view, organize, and manage team workflows and tasks.

Instructions

Get a list of projects from Linear

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for the 'linear_getProjects' tool. It takes no input arguments (as per schema), calls LinearService.getProjects(), and handles errors by logging and rethrowing.
    export function handleGetProjects(linearService: LinearService) {
      return async (args: unknown) => {
        try {
          return await linearService.getProjects();
        } catch (error) {
          logError("Error getting projects", error);
          throw error;
        }
      };
    }
  • Tool schema definition specifying empty input and detailed output structure for projects including id, name, description, state, teams array, and url.
    export const getProjectsToolDefinition: MCPToolDefinition = {
      name: "linear_getProjects",
      description: "Get a list of projects from Linear",
      input_schema: {
        type: "object",
        properties: {},
      },
      output_schema: {
        type: "array",
        items: {
          type: "object",
          properties: {
            id: { type: "string" },
            name: { type: "string" },
            description: { type: "string" },
            state: { type: "string" },
            teams: {
              type: "array",
              items: {
                type: "object",
                properties: {
                  id: { type: "string" },
                  name: { type: "string" }
                }
              }
            },
            url: { type: "string" }
          }
        }
      }
    };
  • Tool registration mapping the name 'linear_getProjects' to its handler function within the registerToolHandlers export.
    linear_getProjects: handleGetProjects(linearService),
  • Core service method implementing the project fetching logic using Linear client SDK, resolving projects and their teams asynchronously. Called by the tool handler.
    async getProjects() {
      const projects = await this.client.projects();
      return Promise.all(
        projects.nodes.map(async (project) => {
          // We need to fetch teams using the relationship
          const teams = await project.teams();
    
          return {
            id: project.id,
            name: project.name,
            description: project.description,
            state: project.state,
            teams: teams.nodes.map((team) => ({
              id: team.id,
              name: team.name,
            })),
          };
        }),
      );
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It only states the read-only behavior but omits details like authentication requirements, pagination, rate limits, or the possibility of empty results. The description is too brief to be transparent.

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 with no wasted words. It is concise but sacrifices informational richness for brevity, which is acceptable for a simple tool.

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?

For a zero-parameter list tool, the description covers the essential function. However, it lacks details about access scope, possible filters (if any), and the structure of the returned data. A more complete description would include these nuances.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, so the baseline is 4. The description is not required to add parameter info since there are none, and it correctly omits any.

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 the resource 'projects', making the tool's basic purpose clear. However, it lacks specificity about the scope (e.g., all projects, user's projects) and does not differentiate from other list tools beyond the resource name.

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 usage guidance is provided. The description does not mention when to use this tool versus alternatives like getProjectById or filtered project queries, forcing the agent to infer from context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.