linear_archiveIssue
Archive an issue in Linear by specifying its ID, enabling efficient project management and decluttering active task lists.
Instructions
Archive an issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueId | Yes | ID or identifier of the issue to archive (e.g., ABC-123) |
Implementation Reference
- The main handler function for the linear_archiveIssue tool. It validates the input using isArchiveIssueArgs type guard and delegates to the LinearService.archiveIssue method to perform the archiving.export function handleArchiveIssue(linearService: LinearService) { return async (args: unknown) => { try { if (!isArchiveIssueArgs(args)) { throw new Error('Invalid arguments for archiveIssue'); } return await linearService.archiveIssue(args.issueId); } catch (error) { logError('Error archiving issue', error); throw error; } }; }
- The MCP tool definition for linear_archiveIssue, specifying the name, description, input schema (issueId required), and output schema (success boolean and message).export const archiveIssueToolDefinition: MCPToolDefinition = { name: 'linear_archiveIssue', description: 'Archive an issue', input_schema: { type: 'object', properties: { issueId: { type: 'string', description: 'ID or identifier of the issue to archive (e.g., ABC-123)', }, }, required: ['issueId'], }, output_schema: { type: 'object', properties: { success: { type: 'boolean' }, message: { type: 'string' }, }, }, };
- src/tools/handlers/index.ts:117-117 (registration)Registration of the linear_archiveIssue tool name mapped to the handleArchiveIssue handler function, within the registerToolHandlers export.linear_archiveIssue: handleArchiveIssue(linearService),
- src/tools/type-guards.ts:329-340 (helper)Type guard helper function used by the handler to validate that the input arguments contain a valid 'issueId' string.* Type guard for linear_archiveIssue tool arguments */ export function isArchiveIssueArgs(args: unknown): args is { issueId: string; } { return ( typeof args === 'object' && args !== null && 'issueId' in args && typeof (args as { issueId: string }).issueId === 'string' ); }