linear_assignIssue
Assign a Linear issue to a specific team member or unassign it to manage task ownership and workflow distribution.
Instructions
Assign an issue to a user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueId | Yes | ID or identifier of the issue to assign (e.g., ABC-123) | |
| assigneeId | Yes | ID of the user to assign the issue to, or null to unassign |
Implementation Reference
- The main handler function for the linear_assignIssue tool. It validates arguments using isAssignIssueArgs and calls linearService.assignIssue to perform the assignment./** * Handler for assigning an issue to a user */ export function handleAssignIssue(linearService: LinearService) { return async (args: unknown) => { try { if (!isAssignIssueArgs(args)) { throw new Error('Invalid arguments for assignIssue'); } return await linearService.assignIssue(args.issueId, args.assigneeId); } catch (error) { logError('Error assigning issue', error); throw error; } }; }
- The tool definition including input_schema and output_schema for linear_assignIssue.export const assignIssueToolDefinition: MCPToolDefinition = { name: 'linear_assignIssue', description: 'Assign an issue to a user', input_schema: { type: 'object', properties: { issueId: { type: 'string', description: 'ID or identifier of the issue to assign (e.g., ABC-123)', }, assigneeId: { type: 'string', description: 'ID of the user to assign the issue to, or null to unassign', }, }, required: ['issueId', 'assigneeId'], }, output_schema: { type: 'object', properties: { success: { type: 'boolean' }, issue: { type: 'object', properties: { id: { type: 'string' }, identifier: { type: 'string' }, title: { type: 'string' }, assignee: { type: 'object' }, url: { type: 'string' }, }, }, }, }, };
- src/tools/handlers/index.ts:113-113 (registration)Registration of the linear_assignIssue tool mapping to the handleAssignIssue handler function.linear_assignIssue: handleAssignIssue(linearService),
- src/tools/type-guards.ts:258-272 (helper)Type guard function used in the handler to validate arguments for linear_assignIssue.* Type guard for linear_assignIssue tool arguments */ export function isAssignIssueArgs(args: unknown): args is { issueId: string; assigneeId: string; } { return ( typeof args === 'object' && args !== null && 'issueId' in args && typeof (args as { issueId: string }).issueId === 'string' && 'assigneeId' in args && typeof (args as { assigneeId: string }).assigneeId === 'string' ); }
- src/tools/handlers/index.ts:2-23 (registration)Import of the handleAssignIssue function from issue-handlers.ts for use in tool registration.import { handleGetIssues, handleGetIssueById, handleSearchIssues, handleCreateIssue, handleUpdateIssue, handleCreateComment, handleAddIssueLabel, handleRemoveIssueLabel, // New Issue Management handlers handleAssignIssue, handleSubscribeToIssue, handleConvertIssueToSubtask, handleCreateIssueRelation, handleArchiveIssue, handleSetIssuePriority, handleTransferIssue, handleDuplicateIssue, handleGetIssueHistory, // Comment Management handlers handleGetComments, } from './issue-handlers.js';