Skip to main content
Glama

linear_addIssueToCycle

Add a Linear issue to a project cycle to organize and schedule work items for tracking progress and deadlines.

Instructions

Add an issue to a cycle

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYesID or identifier of the issue to add to the cycle
cycleIdYesID of the cycle to add the issue to

Implementation Reference

  • The handler function that implements the core logic for the linear_addIssueToCycle tool. Validates arguments and invokes the Linear service method.
    export function handleAddIssueToCycle(linearService: LinearService) {
      return async (args: unknown) => {
        try {
          if (!isAddIssueToCycleArgs(args)) {
            throw new Error('Invalid arguments for addIssueToCycle');
          }
    
          return await linearService.addIssueToCycle(args.issueId, args.cycleId);
        } catch (error) {
          logError('Error adding issue to cycle', error);
          throw error;
        }
      };
    }
  • The MCP tool definition including input schema (issueId and cycleId required) and output schema for linear_addIssueToCycle.
    export const addIssueToCycleToolDefinition: MCPToolDefinition = {
      name: 'linear_addIssueToCycle',
      description: 'Add an issue to a cycle',
      input_schema: {
        type: 'object',
        properties: {
          issueId: {
            type: 'string',
            description: 'ID or identifier of the issue to add to the cycle',
          },
          cycleId: {
            type: 'string',
            description: 'ID of the cycle to add the issue to',
          },
        },
        required: ['issueId', 'cycleId'],
      },
      output_schema: {
        type: 'object',
        properties: {
          success: { type: 'boolean' },
          issue: {
            type: 'object',
            properties: {
              id: { type: 'string' },
              identifier: { type: 'string' },
              title: { type: 'string' },
              cycle: {
                type: 'object',
                properties: {
                  id: { type: 'string' },
                  number: { type: 'number' },
                  name: { type: 'string' },
                },
              },
            },
          },
        },
      },
    };
  • Registration of the linear_addIssueToCycle tool handler within the registerToolHandlers function.
    linear_addIssueToCycle: handleAddIssueToCycle(linearService),
  • Type guard function used in the handler to validate arguments for linear_addIssueToCycle.
    export function isAddIssueToCycleArgs(args: unknown): args is {
      issueId: string;
      cycleId: string;
    } {
      return (
        typeof args === 'object' &&
        args !== null &&
        'issueId' in args &&
        typeof (args as { issueId: string }).issueId === 'string' &&
        'cycleId' in args &&
        typeof (args as { cycleId: string }).cycleId === 'string'
      );
    }

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