Skip to main content
Glama

linear_setIssuePriority

Set priority levels for Linear issues to manage workflow and focus on critical tasks. Use numeric values from 0 (No priority) to 4 (Low) to organize project management.

Instructions

Set the priority of an issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYesID or identifier of the issue (e.g., ABC-123)
priorityYesPriority level (0 = No priority, 1 = Urgent, 2 = High, 3 = Normal, 4 = Low)

Implementation Reference

  • The main handler function for the linear_setIssuePriority tool. It validates the input arguments using a type guard and delegates the actual priority update to the LinearService.
    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 schema definition including input and output schemas 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' }, }, }, }, }, };
  • Registration of the tool handler in the registerToolHandlers function.
    linear_setIssuePriority: handleSetIssuePriority(linearService),
  • Type guard function for validating the input arguments of linear_setIssuePriority.
    * 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) ); }
  • The LinearService method that performs the actual API call to update the issue priority using the Linear SDK.
    async setIssuePriority(issueId: string, priority: number) { try { // Get the issue const issue = await this.client.issue(issueId); if (!issue) { throw new Error(`Issue with ID ${issueId} not found`); } // Update the issue priority await issue.update({ priority: priority, }); // Get the updated issue const updatedIssue = await this.client.issue(issue.id); return { success: true, issue: { id: updatedIssue.id, identifier: updatedIssue.identifier, title: updatedIssue.title, priority: updatedIssue.priority, url: updatedIssue.url, }, }; } catch (error) { console.error('Error setting issue priority:', error); throw error; } }

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