linear_addIssueToCycle
Add a Linear issue to a project cycle to organize work and track progress within scheduled timeframes.
Instructions
Add an issue to a cycle
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueId | Yes | ID or identifier of the issue to add to the cycle | |
| cycleId | Yes | ID of the cycle to add the issue to |
Implementation Reference
- The core handler function that implements the logic for the linear_addIssueToCycle tool. It validates the input arguments using the type guard and delegates to the LinearService.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 input and output schema definition for the linear_addIssueToCycle tool.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" }, } } } } } } };
- src/tools/handlers/index.ts:72-76 (registration)Registration of the linear_addIssueToCycle handler within the registerToolHandlers function.// Cycle Management tools linear_getCycles: handleGetCycles(linearService), linear_getActiveCycle: handleGetActiveCycle(linearService), linear_addIssueToCycle: handleAddIssueToCycle(linearService),
- src/tools/type-guards.ts:498-510 (helper)Type guard function used in the handler to validate input 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" ); }