linear_addIssueToCycle
Add a specific issue to a designated cycle in the Linear project management system to organize and track progress effectively.
Instructions
Add an issue to a cycle
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cycleId | Yes | ID of the cycle to add the issue to | |
| issueId | Yes | ID or identifier of the issue to add to the cycle |
Input Schema (JSON Schema)
{
"properties": {
"cycleId": {
"description": "ID of the cycle to add the issue to",
"type": "string"
},
"issueId": {
"description": "ID or identifier of the issue to add to the cycle",
"type": "string"
}
},
"required": [
"issueId",
"cycleId"
],
"type": "object"
}
Implementation Reference
- The main handler function implementing the linear_addIssueToCycle tool logic: validates arguments using type guard and delegates to LinearService.addIssueToCycle.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; } }; }
- MCP tool definition including input schema (issueId, 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' }, }, }, }, }, }, }, };
- src/tools/handlers/index.ts:88-88 (registration)Registration of the linear_addIssueToCycle tool handler within the registerToolHandlers function.linear_addIssueToCycle: handleAddIssueToCycle(linearService),
- src/tools/type-guards.ts:678-692 (helper)Type guard function for validating arguments to linear_addIssueToCycle tool.* Type guard for linear_addIssueToCycle tool arguments */ 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' ); }