Skip to main content
Glama

linear_getInitiativeById

Retrieve details of a specific Linear initiative using its ID, including associated projects if needed, to access project management information.

Instructions

Get details of a specific initiative by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
initiativeIdYesThe ID of the initiative to retrieve
includeProjectsNoInclude associated projects in the response

Implementation Reference

  • The main handler function for the linear_getInitiativeById tool. It validates the input arguments using a type guard and then calls the LinearService to fetch the initiative by ID, optionally including associated projects.
    export function getInitiativeByIdHandler(linearService: LinearService) {
      return async (args: unknown) => {
        if (!isGetInitiativeByIdInput(args)) {
          throw new Error('Invalid input for getInitiativeById');
        }
    
        console.log(`[getInitiativeById] Fetching initiative: ${args.initiativeId}`);
        const initiative = await linearService.getInitiativeById(
          args.initiativeId,
          args.includeProjects,
        );
        console.log(`[getInitiativeById] Retrieved initiative: ${initiative.name}`);
        return initiative;
      };
    }
  • The MCP tool definition (schema) for linear_getInitiativeById, including input and output schemas with properties like initiativeId (required) and optional includeProjects.
    {
      name: 'linear_getInitiativeById',
      description: 'Get details of a specific initiative by ID',
      input_schema: {
        type: 'object',
        properties: {
          initiativeId: {
            type: 'string',
            description: 'The ID of the initiative to retrieve',
          },
          includeProjects: {
            type: 'boolean',
            description: 'Include associated projects in the response',
            default: true,
          },
        },
        required: ['initiativeId'],
      },
      output_schema: {
        type: 'object',
        properties: {
          id: { type: 'string' },
          name: { type: 'string' },
          description: { type: 'string' },
          content: { type: 'string' },
          icon: { type: 'string' },
          color: { type: 'string' },
          status: { type: 'string' },
          targetDate: { type: 'string' },
          sortOrder: { type: 'number' },
          owner: {
            type: 'object',
            properties: {
              id: { type: 'string' },
              name: { type: 'string' },
              email: { type: 'string' },
            },
          },
          projects: {
            type: 'array',
            items: {
              type: 'object',
              properties: {
                id: { type: 'string' },
                name: { type: 'string' },
                state: { type: 'string' },
              },
            },
          },
          url: { type: 'string' },
        },
      },
    },
  • Registration of the linear_getInitiativeById handler in the registerToolHandlers function, mapping the tool name to the handler instance.
    linear_getInitiativeById: getInitiativeByIdHandler(linearService),
  • Type guard function used by the handler to validate input arguments for linear_getInitiativeById, ensuring initiativeId is string and includeProjects is boolean.
    export function isGetInitiativeByIdInput(args: unknown): args is {
      initiativeId: string;
      includeProjects?: boolean;
    } {
      return (
        typeof args === 'object' &&
        args !== null &&
        'initiativeId' in args &&
        typeof (args as { initiativeId: string }).initiativeId === 'string' &&
        (!('includeProjects' in args) ||
          typeof (args as { includeProjects: boolean }).includeProjects === 'boolean')
      );
    }
  • src/index.ts:44-55 (registration)
    Top-level registration in the MCP server where registerToolHandlers is called to get the map of handlers, and the specific tool is dispatched based on req.name.
    handleRequest: async (req: { name: string; args: unknown }) => {
      const handlers = registerToolHandlers(linearService);
      const toolName = req.name;
    
      if (toolName in handlers) {
        // Use a type assertion here since we know the tool name is valid
        const handler = handlers[toolName as keyof typeof handlers];
        return await handler(req.args);
      } else {
        throw new Error(`Unknown tool: ${toolName}`);
      }
    },
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 this is a 'Get' operation, implying read-only behavior, but doesn't specify whether it requires authentication, has rate limits, returns structured data, or handles errors (e.g., invalid IDs). For a tool with zero annotation coverage, this leaves significant gaps in understanding its operational traits.

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 front-loads the core purpose without unnecessary words. Every part ('Get details of a specific initiative by ID') earns its place by clearly conveying the tool's function. There's no redundancy or fluff, making it easy to parse 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 complexity of a read operation with 2 parameters and no output schema, the description is incomplete. It lacks details on return values (e.g., what 'details' include), error handling, or behavioral context like authentication needs. With no annotations and no output schema, the description should provide more guidance to compensate, but it doesn't, leaving gaps for effective tool 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?

Schema description coverage is 100%, so the schema fully documents both parameters ('initiativeId' and 'includeProjects'). The description adds no additional meaning beyond what's in the schema—it doesn't explain parameter interactions, default behavior implications, or format details. With high schema coverage, a baseline score of 3 is appropriate as the description doesn't compensate but doesn't detract either.

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 action ('Get details') and resource ('specific initiative by ID'), making the purpose immediately understandable. It distinguishes this tool from siblings like 'linear_getInitiatives' (which lists multiple initiatives) and 'linear_getInitiativeProjects' (which focuses on projects within initiatives). However, it doesn't specify what 'details' include, which could be more precise.

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 when to choose this over 'linear_getInitiatives' for listing initiatives or 'linear_getInitiativeProjects' for project-focused data. There's no context about prerequisites, such as needing a valid initiative ID, or exclusions for archived initiatives.

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