linear_updateIssue
Modify an existing issue in Linear by updating its title, description, state, priority, project, assignee, cycle, estimate, due date, labels, parent issue, subscribers, team, or sort order. Use this tool to streamline issue management and ensure accurate project tracking.
Instructions
Update an existing issue in Linear
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| addedLabelIds | No | IDs of labels to add to the issue (without removing existing ones) | |
| assigneeId | No | ID of the user to assign the issue to, or null to unassign | |
| cycleId | No | ID of the cycle to move the issue to, or null to remove from current cycle | |
| description | No | New description for the issue (Markdown supported) | |
| dueDate | No | The new due date for the issue (YYYY-MM-DD format), or null to remove | |
| estimate | No | The estimated complexity/points for the issue | |
| id | Yes | ID or identifier of the issue to update (e.g., ABC-123) | |
| labelIds | No | IDs of the labels to set on the issue (replacing existing labels) | |
| parentId | No | ID of the parent issue, or null to convert to a regular issue | |
| priority | No | New priority for the issue (0 = No priority, 1 = Urgent, 2 = High, 3 = Normal, 4 = Low) | |
| projectId | No | ID of the project to move the issue to | |
| removedLabelIds | No | IDs of labels to remove from the issue | |
| sortOrder | No | The position of the issue in relation to other issues | |
| stateId | No | ID of the new state for the issue | |
| subscriberIds | No | IDs of the users to subscribe to the issue (replacing existing subscribers) | |
| teamId | No | ID of the team to move the issue to | |
| title | No | New title for the issue |
Implementation Reference
- Handler function that validates input arguments using the type guard and delegates to LinearService.updateIssue to perform the update.export function handleUpdateIssue(linearService: LinearService) { return async (args: unknown) => { try { if (!isUpdateIssueArgs(args)) { throw new Error('Invalid arguments for updateIssue'); } return await linearService.updateIssue(args); } catch (error) { logError('Error updating issue', error); throw error; } }; }
- Tool schema definition including name 'linear_updateIssue', input schema for update parameters, and output schema.export const updateIssueToolDefinition: MCPToolDefinition = { name: 'linear_updateIssue', description: 'Update an existing issue in Linear', input_schema: { type: 'object', properties: { id: { type: 'string', description: 'ID or identifier of the issue to update (e.g., ABC-123)', }, title: { type: 'string', description: 'New title for the issue', }, description: { type: 'string', description: 'New description for the issue (Markdown supported)', }, stateId: { type: 'string', description: 'ID of the new state for the issue', }, priority: { type: 'number', description: 'New priority for the issue (0 = No priority, 1 = Urgent, 2 = High, 3 = Normal, 4 = Low)', }, projectId: { type: 'string', description: 'ID of the project to move the issue to', }, assigneeId: { type: 'string', description: 'ID of the user to assign the issue to, or null to unassign', }, cycleId: { type: 'string', description: 'ID of the cycle to move the issue to, or null to remove from current cycle', }, estimate: { type: 'number', description: 'The estimated complexity/points for the issue', }, dueDate: { type: 'string', description: 'The new due date for the issue (YYYY-MM-DD format), or null to remove', }, labelIds: { type: 'array', items: { type: 'string' }, description: 'IDs of the labels to set on the issue (replacing existing labels)', }, addedLabelIds: { type: 'array', items: { type: 'string' }, description: 'IDs of labels to add to the issue (without removing existing ones)', }, removedLabelIds: { type: 'array', items: { type: 'string' }, description: 'IDs of labels to remove from the issue', }, parentId: { type: 'string', description: 'ID of the parent issue, or null to convert to a regular issue', }, subscriberIds: { type: 'array', items: { type: 'string' }, description: 'IDs of the users to subscribe to the issue (replacing existing subscribers)', }, teamId: { type: 'string', description: 'ID of the team to move the issue to', }, sortOrder: { type: 'number', description: 'The position of the issue in relation to other issues', }, }, required: ['id'], }, output_schema: { type: 'object', properties: { id: { type: 'string' }, identifier: { type: 'string' }, title: { type: 'string' }, url: { type: 'string' }, }, }, };
- src/tools/handlers/index.ts:107-107 (registration)Registration of the 'linear_updateIssue' tool mapping to the handleUpdateIssue handler in the registerToolHandlers function.linear_updateIssue: handleUpdateIssue(linearService),
- src/tools/type-guards.ts:135-182 (helper)Type guard function isUpdateIssueArgs used by the handler to validate input arguments.* Type guard for linear_updateIssue tool arguments */ export function isUpdateIssueArgs(args: unknown): args is { id: string; title?: string; description?: string; stateId?: string; priority?: number; projectId?: string; assigneeId?: string; cycleId?: string; estimate?: number; dueDate?: string; labelIds?: string[]; addedLabelIds?: string[]; removedLabelIds?: string[]; parentId?: string; subscriberIds?: string[]; teamId?: string; sortOrder?: number; } { return ( typeof args === 'object' && args !== null && 'id' in args && typeof (args as { id: string }).id === 'string' && (!('title' in args) || typeof (args as { title: string }).title === 'string') && (!('description' in args) || typeof (args as { description: string }).description === 'string') && (!('stateId' in args) || typeof (args as { stateId: string }).stateId === 'string') && (!('priority' in args) || typeof (args as { priority: number }).priority === 'number') && (!('projectId' in args) || typeof (args as { projectId: string }).projectId === 'string') && (!('assigneeId' in args) || typeof (args as { assigneeId: string }).assigneeId === 'string') && (!('cycleId' in args) || typeof (args as { cycleId: string }).cycleId === 'string') && (!('estimate' in args) || typeof (args as { estimate: number }).estimate === 'number') && (!('dueDate' in args) || typeof (args as { dueDate: string }).dueDate === 'string') && (!('labelIds' in args) || Array.isArray((args as { labelIds: string[] }).labelIds)) && (!('addedLabelIds' in args) || Array.isArray((args as { addedLabelIds: string[] }).addedLabelIds)) && (!('removedLabelIds' in args) || Array.isArray((args as { removedLabelIds: string[] }).removedLabelIds)) && (!('parentId' in args) || typeof (args as { parentId: string }).parentId === 'string') && (!('subscriberIds' in args) || Array.isArray((args as { subscriberIds: string[] }).subscriberIds)) && (!('teamId' in args) || typeof (args as { teamId: string }).teamId === 'string') && (!('sortOrder' in args) || typeof (args as { sortOrder: number }).sortOrder === 'number') ); }