linear_subscribeToIssue
Subscribe to receive notifications about updates for a specific Linear issue by providing its ID, enabling you to stay informed on changes.
Instructions
Subscribe to issue updates
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueId | Yes | ID or identifier of the issue to subscribe to (e.g., ABC-123) |
Implementation Reference
- Handler function that validates arguments using isSubscribeToIssueArgs and calls linearService.subscribeToIssue to subscribe the current user to the specified issue.export function handleSubscribeToIssue(linearService: LinearService) { return async (args: unknown) => { try { if (!isSubscribeToIssueArgs(args)) { throw new Error("Invalid arguments for subscribeToIssue"); } return await linearService.subscribeToIssue(args.issueId); } catch (error) { logError("Error subscribing to issue", error); throw error; } }; }
- MCP tool definition including name, description, input schema (requires issueId), and output schema (success boolean and message).export const subscribeToIssueToolDefinition: MCPToolDefinition = { name: "linear_subscribeToIssue", description: "Subscribe to issue updates", input_schema: { type: "object", properties: { issueId: { type: "string", description: "ID or identifier of the issue to subscribe to (e.g., ABC-123)", }, }, required: ["issueId"], }, output_schema: { type: "object", properties: { success: { type: "boolean" }, message: { type: "string" } } } };
- src/tools/handlers/index.ts:51-101 (registration)Registration of the linear_subscribeToIssue handler within the registerToolHandlers function, mapping the tool name to handleSubscribeToIssue curried with LinearService.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), // 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:267-278 (helper)Type guard function to validate input arguments for the linear_subscribeToIssue tool, ensuring issueId is a string.* Type guard for linear_subscribeToIssue tool arguments */ export function isSubscribeToIssueArgs(args: unknown): args is { issueId: string; } { return ( typeof args === "object" && args !== null && "issueId" in args && typeof (args as { issueId: string }).issueId === "string" ); }