linear_archiveIssue
Archive issues in Linear to remove them from active workflows while preserving their history and data.
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
- Handler function that implements the core logic for the linear_archiveIssue tool: validates input using type guard and calls linearService.archiveIssue.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; } }; }
- Tool definition including input and output schemas for linear_archiveIssue.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:92-92 (registration)Registration of the linear_archiveIssue tool, mapping it to the handleArchiveIssue handler function.linear_archiveIssue: handleArchiveIssue(linearService),
- src/tools/type-guards.ts:321-330 (helper)Type guard function used in the handler to validate the input arguments for linear_archiveIssue.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" ); }