linear_transferIssue
Move an issue to a different team within the Linear project management system by specifying the issue ID and the target team ID.
Instructions
Transfer an issue to another team
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueId | Yes | ID or identifier of the issue to transfer (e.g., ABC-123) | |
| teamId | Yes | ID of the team to transfer the issue to |
Implementation Reference
- The main handler function that implements the execution logic for the 'linear_transferIssue' tool. It validates the input arguments using a type guard and delegates to the LinearService.transferIssue method.export function handleTransferIssue(linearService: LinearService) { return async (args: unknown) => { try { if (!isTransferIssueArgs(args)) { throw new Error('Invalid arguments for transferIssue'); } return await linearService.transferIssue(args.issueId, args.teamId); } catch (error) { logError('Error transferring issue', error); throw error; } }; }
- The tool schema definition for 'linear_transferIssue', specifying the name, description, input schema (requiring issueId and teamId), and output schema.export const transferIssueToolDefinition: MCPToolDefinition = { name: 'linear_transferIssue', description: 'Transfer an issue to another team', input_schema: { type: 'object', properties: { issueId: { type: 'string', description: 'ID or identifier of the issue to transfer (e.g., ABC-123)', }, teamId: { type: 'string', description: 'ID of the team to transfer the issue to', }, }, required: ['issueId', 'teamId'], }, output_schema: { type: 'object', properties: { success: { type: 'boolean' }, issue: { type: 'object', properties: { id: { type: 'string' }, identifier: { type: 'string' }, title: { type: 'string' }, team: { type: 'object' }, url: { type: 'string' }, }, }, }, }, };
- src/tools/handlers/index.ts:64-126 (registration)The registration of the 'linear_transferIssue' tool in the central registry map, mapping it to the handleTransferIssue handler function.export function registerToolHandlers(linearService: LinearService) { return { // User tools linear_getViewer: handleGetViewer(linearService), linear_getOrganization: handleGetOrganization(linearService), linear_getUsers: handleGetUsers(linearService), linear_getLabels: handleGetLabels(linearService), // Team tools linear_getTeams: handleGetTeams(linearService), linear_getWorkflowStates: handleGetWorkflowStates(linearService), // Project tools linear_getProjects: handleGetProjects(linearService), linear_createProject: handleCreateProject(linearService), // Project Management tools linear_updateProject: handleUpdateProject(linearService), linear_addIssueToProject: handleAddIssueToProject(linearService), linear_getProjectIssues: handleGetProjectIssues(linearService), // Cycle Management tools linear_getCycles: handleGetCycles(linearService), linear_getActiveCycle: handleGetActiveCycle(linearService), linear_addIssueToCycle: handleAddIssueToCycle(linearService), // Initiative Management tools linear_getInitiatives: getInitiativesHandler(linearService), linear_getInitiativeById: getInitiativeByIdHandler(linearService), linear_createInitiative: createInitiativeHandler(linearService), linear_updateInitiative: updateInitiativeHandler(linearService), linear_archiveInitiative: archiveInitiativeHandler(linearService), linear_unarchiveInitiative: unarchiveInitiativeHandler(linearService), linear_deleteInitiative: deleteInitiativeHandler(linearService), linear_getInitiativeProjects: getInitiativeProjectsHandler(linearService), linear_addProjectToInitiative: addProjectToInitiativeHandler(linearService), linear_removeProjectFromInitiative: removeProjectFromInitiativeHandler(linearService), // Issue tools linear_getIssues: handleGetIssues(linearService), linear_getIssueById: handleGetIssueById(linearService), linear_searchIssues: handleSearchIssues(linearService), linear_createIssue: handleCreateIssue(linearService), linear_updateIssue: handleUpdateIssue(linearService), linear_createComment: handleCreateComment(linearService), linear_addIssueLabel: handleAddIssueLabel(linearService), linear_removeIssueLabel: handleRemoveIssueLabel(linearService), // New Issue Management tools linear_assignIssue: handleAssignIssue(linearService), linear_subscribeToIssue: handleSubscribeToIssue(linearService), linear_convertIssueToSubtask: handleConvertIssueToSubtask(linearService), linear_createIssueRelation: handleCreateIssueRelation(linearService), linear_archiveIssue: handleArchiveIssue(linearService), linear_setIssuePriority: handleSetIssuePriority(linearService), linear_transferIssue: handleTransferIssue(linearService), linear_duplicateIssue: handleDuplicateIssue(linearService), linear_getIssueHistory: handleGetIssueHistory(linearService), // Comment Management tools linear_getComments: handleGetComments(linearService), }; }
- src/tools/type-guards.ts:360-375 (schema)Type guard function for validating input arguments of the 'linear_transferIssue' tool, ensuring issueId and teamId are strings./** * Type guard for linear_transferIssue tool arguments */ export function isTransferIssueArgs(args: unknown): args is { issueId: string; teamId: string; } { return ( typeof args === 'object' && args !== null && 'issueId' in args && typeof (args as { issueId: string }).issueId === 'string' && 'teamId' in args && typeof (args as { teamId: string }).teamId === 'string' ); }