linear_setIssuePriority
Update the priority level of an issue in Linear project management. Specify the issue ID and choose from priority levels: 0 = No priority, 1 = Urgent, 2 = High, 3 = Normal, 4 = Low.
Instructions
Set the priority of an issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueId | Yes | ID or identifier of the issue (e.g., ABC-123) | |
| priority | Yes | Priority level (0 = No priority, 1 = Urgent, 2 = High, 3 = Normal, 4 = Low) |
Implementation Reference
- The main handler function that implements the execution logic for the 'linear_setIssuePriority' tool. It validates the input arguments using isSetIssuePriorityArgs and delegates to LinearService.setIssuePriority.export function handleSetIssuePriority(linearService: LinearService) { return async (args: unknown) => { try { if (!isSetIssuePriorityArgs(args)) { throw new Error('Invalid arguments for setIssuePriority'); } return await linearService.setIssuePriority(args.issueId, args.priority); } catch (error) { logError('Error setting issue priority', error); throw error; } }; }
- The tool definition (MCPToolDefinition) specifying the name, description, input_schema, and output_schema for 'linear_setIssuePriority'.export const setIssuePriorityToolDefinition: MCPToolDefinition = { name: 'linear_setIssuePriority', description: 'Set the priority of an issue', input_schema: { type: 'object', properties: { issueId: { type: 'string', description: 'ID or identifier of the issue (e.g., ABC-123)', }, priority: { type: 'number', description: 'Priority level (0 = No priority, 1 = Urgent, 2 = High, 3 = Normal, 4 = Low)', enum: [0, 1, 2, 3, 4], }, }, required: ['issueId', 'priority'], }, output_schema: { type: 'object', properties: { success: { type: 'boolean' }, issue: { type: 'object', properties: { id: { type: 'string' }, identifier: { type: 'string' }, title: { type: 'string' }, priority: { type: 'number' }, url: { type: 'string' }, }, }, }, }, };
- src/tools/handlers/index.ts:118-118 (registration)Registration of the 'linear_setIssuePriority' handler within the registerToolHandlers function, mapping the tool name to handleSetIssuePriority.linear_setIssuePriority: handleSetIssuePriority(linearService),
- src/tools/type-guards.ts:343-358 (helper)Type guard function for validating the input arguments of the 'linear_setIssuePriority' tool, ensuring issueId is string and priority is a valid number (0-4).* Type guard for linear_setIssuePriority tool arguments */ export function isSetIssuePriorityArgs(args: unknown): args is { issueId: string; priority: number; } { return ( typeof args === 'object' && args !== null && 'issueId' in args && typeof (args as { issueId: string }).issueId === 'string' && 'priority' in args && typeof (args as { priority: number }).priority === 'number' && [0, 1, 2, 3, 4].includes((args as { priority: number }).priority) ); }