Skip to main content
Glama
tiovikram

Linear MCP Server

by tiovikram

list_projects

Retrieve all projects from Linear, optionally filtered by team ID, to manage and organize development work programmatically.

Instructions

List all projects

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamIdNoFilter by team ID (optional)
firstNoNumber of projects to return (default: 50)

Implementation Reference

  • The handler logic for the 'list_projects' tool. Parses arguments, builds filter for teamId, queries Linear projects with pagination, resolves teams for each project, formats output with id, name, description, state, teamIds, and returns as JSON text content.
    case "list_projects": {
      const args = request.params.arguments as unknown as ListProjectsArgs;
      const filter: Record<string, any> = {};
      if (args?.teamId) filter.team = { id: { eq: args.teamId } };
    
      const query = await linearClient.projects({
        first: args?.first ?? 50,
        filter,
      });
    
      const projects = await Promise.all(
        (query as any).nodes.map(async (project: any) => {
          const teamsConnection = await project.teams;
          const teams = teamsConnection ? (teamsConnection as any).nodes : [];
          return {
            id: project.id,
            name: project.name,
            description: project.description,
            state: project.state,
            teamIds: teams.map((team: any) => team.id),
          };
        })
      );
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(projects, null, 2),
          },
        ],
      };
    }
  • TypeScript interface defining the expected input arguments for the list_projects tool: optional teamId and first.
    type ListProjectsArgs = {
      teamId?: string;
      first?: number;
    };
  • src/index.ts:169-185 (registration)
    Registration of the list_projects tool in the tools list returned by ListToolsRequestSchema, including name, description, and JSON schema for inputs.
    {
      name: "list_projects",
      description: "List all projects",
      inputSchema: {
        type: "object",
        properties: {
          teamId: {
            type: "string",
            description: "Filter by team ID (optional)",
          },
          first: {
            type: "number",
            description: "Number of projects to return (default: 50)",
          },
        },
      },
    },
  • src/index.ts:51-51 (registration)
    Declaration in server capabilities indicating support for the list_projects tool.
    list_projects: true,
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'List all projects' implies a read-only operation but doesn't specify critical behaviors like pagination (hinted by the 'first' parameter), rate limits, authentication needs, or whether it returns all projects or a subset. This leaves significant gaps for a tool with parameters.

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 is front-loaded and directly states the core functionality, making it easy for an agent to parse quickly. Every word earns its place.

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 lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like pagination, error handling, or return format, which are crucial for a list operation with filtering parameters. The schema covers inputs well, but the overall context for safe and effective use is underspecified.

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%, with clear parameter descriptions in the schema (e.g., 'teamId' for filtering, 'first' for limiting results). The description adds no parameter-specific information beyond what the schema provides, so it meets the baseline for high schema coverage without compensating value.

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 'List all projects' clearly states the verb ('List') and resource ('projects'), making the purpose immediately understandable. It distinguishes from siblings like 'list_issues' or 'list_teams' by specifying the resource type. However, it lacks specificity about scope (e.g., workspace-wide vs. user-specific) which prevents a perfect score.

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, context (e.g., after listing teams), or comparisons to siblings like 'search_issues' for filtered queries. The agent must infer usage solely from the tool name and schema.

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

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