Skip to main content
Glama

linear_getInitiativeProjects

Retrieve all projects linked to a specific initiative in Linear, including optional archived projects, to track initiative progress and organization.

Instructions

Get all projects associated with an initiative

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
initiativeIdYesThe ID of the initiative
includeArchivedNoInclude archived projects in the results

Implementation Reference

  • The core handler function for the linear_getInitiativeProjects tool. It validates the input arguments using a type guard, logs the action, calls the LinearService to fetch associated projects, and returns them.
    export function getInitiativeProjectsHandler(linearService: LinearService) {
      return async (args: unknown) => {
        if (!isGetInitiativeProjectsInput(args)) {
          throw new Error('Invalid input for getInitiativeProjects');
        }
    
        console.log(`[getInitiativeProjects] Fetching projects for initiative: ${args.initiativeId}`);
        const projects = await linearService.getInitiativeProjects(
          args.initiativeId,
          args.includeArchived,
        );
        console.log(`[getInitiativeProjects] Retrieved ${projects.length} projects`);
        return projects;
      };
    }
  • The tool definition (MCPToolDefinition) specifying the name, description, input schema, and output schema for linear_getInitiativeProjects.
      name: 'linear_getInitiativeProjects',
      description: 'Get all projects associated with an initiative',
      input_schema: {
        type: 'object',
        properties: {
          initiativeId: {
            type: 'string',
            description: 'The ID of the initiative',
          },
          includeArchived: {
            type: 'boolean',
            description: 'Include archived projects in the results',
            default: false,
          },
        },
        required: ['initiativeId'],
      },
      output_schema: {
        type: 'array',
        items: {
          type: 'object',
          properties: {
            id: { type: 'string' },
            name: { type: 'string' },
            description: { type: 'string' },
            state: { type: 'string' },
            progress: { type: 'number' },
            startDate: { type: 'string' },
            targetDate: { type: 'string' },
            teams: {
              type: 'array',
              items: {
                type: 'object',
                properties: {
                  id: { type: 'string' },
                  name: { type: 'string' },
                },
              },
            },
            url: { type: 'string' },
          },
        },
      },
    },
  • Registration of the linear_getInitiativeProjects handler within the registerToolHandlers function's return object.
    linear_deleteInitiative: deleteInitiativeHandler(linearService),
    linear_getInitiativeProjects: getInitiativeProjectsHandler(linearService),
    linear_addProjectToInitiative: addProjectToInitiativeHandler(linearService),
    linear_removeProjectFromInitiative: removeProjectFromInitiativeHandler(linearService),
  • Type guard function isGetInitiativeProjectsInput used by the handler to validate input arguments.
    export function isGetInitiativeProjectsInput(args: unknown): args is {
      initiativeId: string;
      includeArchived?: boolean;
    } {
      return (
        typeof args === 'object' &&
        args !== null &&
        'initiativeId' in args &&
        typeof (args as { initiativeId: string }).initiativeId === 'string' &&
        (!('includeArchived' in args) ||
          typeof (args as { includeArchived: boolean }).includeArchived === 'boolean')
      );
    }
  • Export of the getInitiativeProjectsHandler function from handlers/index.ts.
    getInitiativeProjectsHandler,
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 only states the action without mentioning permissions, rate limits, pagination, or the format of returned projects. For a read operation with potential complexity, this lack of detail is a significant gap.

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 that directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized for its function, earning its place with zero waste.

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 does not address behavioral aspects like permissions or response format, and with sibling tools like 'linear_getProjects' available, it fails to provide necessary contextual differentiation for effective tool selection.

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 input schema fully documents both parameters. The description does not add any semantic details beyond what the schema provides, such as explaining the relationship between initiatives and projects or clarifying the 'includeArchived' default behavior.

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 ('projects associated with an initiative'), making the purpose unambiguous. However, it does not differentiate from sibling tools like 'linear_getProjects' or 'linear_getInitiativeById', which could cause confusion about when to use each.

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. For example, it does not specify if this should be used instead of 'linear_getProjects' for initiative-specific queries or clarify its role relative to 'linear_getInitiativeById', leaving usage context unclear.

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

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