linear_duplicateIssue
Create a copy of an existing issue in Linear to reuse details for similar tasks or track related work.
Instructions
Duplicate an issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueId | Yes | ID or identifier of the issue to duplicate (e.g., ABC-123) |
Implementation Reference
- The handler function that executes the tool logic for 'linear_duplicateIssue'. It validates the input using a type guard and calls the LinearService.duplicateIssue method.export function handleDuplicateIssue(linearService: LinearService) { return async (args: unknown) => { try { if (!isDuplicateIssueArgs(args)) { throw new Error("Invalid arguments for duplicateIssue"); } return await linearService.duplicateIssue(args.issueId); } catch (error) { logError("Error duplicating issue", error); throw error; } }; }
- The MCP tool definition including input and output schemas for 'linear_duplicateIssue'.export const duplicateIssueToolDefinition: MCPToolDefinition = { name: "linear_duplicateIssue", description: "Duplicate an issue", input_schema: { type: "object", properties: { issueId: { type: "string", description: "ID or identifier of the issue to duplicate (e.g., ABC-123)", }, }, required: ["issueId"], }, output_schema: { type: "object", properties: { success: { type: "boolean" }, originalIssue: { type: "object", properties: { id: { type: "string" }, identifier: { type: "string" }, title: { type: "string" } } }, duplicatedIssue: { type: "object", properties: { id: { type: "string" }, identifier: { type: "string" }, title: { type: "string" }, url: { type: "string" } } } } } };
- src/tools/handlers/index.ts:95-95 (registration)Registration of the 'linear_duplicateIssue' tool handler in the central tool handlers map.linear_duplicateIssue: handleDuplicateIssue(linearService),
- src/tools/type-guards.ts:368-379 (helper)Type guard helper function used in the handler to validate arguments for 'linear_duplicateIssue'.* Type guard for linear_duplicateIssue tool arguments */ export function isDuplicateIssueArgs(args: unknown): args is { issueId: string; } { return ( typeof args === "object" && args !== null && "issueId" in args && typeof (args as { issueId: string }).issueId === "string" ); }
- src/tools/handlers/index.ts:19-19 (registration)Import of the handleDuplicateIssue handler function used for registration.handleDuplicateIssue,