feat(task-mcp): Add task_resolve_duplicate tool
Combines close + link operations for duplicate issues: - Closes the duplicate task (sets status to completed) - Creates bidirectional 'duplicates' link to dominant task Usage: task_resolve_duplicate(duplicate_id, dominant_id) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
34
src/index.ts
34
src/index.ts
@@ -20,7 +20,8 @@ import { testConnection, close } from './db.js';
|
||||
import { toolDefinitions } from './tools/index.js';
|
||||
import { taskAdd, taskList, taskShow, taskClose, taskUpdate } from './tools/crud.js';
|
||||
import { taskSimilar, taskContext } from './tools/search.js';
|
||||
import { taskLink, checklistAdd, checklistToggle } from './tools/relations.js';
|
||||
import { taskLink, checklistAdd, checklistToggle, taskResolveDuplicate } from './tools/relations.js';
|
||||
import { epicAdd, epicList, epicShow, epicAssign } from './tools/epics.js';
|
||||
|
||||
// Create MCP server
|
||||
const server = new Server(
|
||||
@@ -114,6 +115,37 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
||||
checked: a.checked,
|
||||
});
|
||||
break;
|
||||
case 'task_resolve_duplicate':
|
||||
result = await taskResolveDuplicate({
|
||||
duplicate_id: a.duplicate_id,
|
||||
dominant_id: a.dominant_id,
|
||||
});
|
||||
break;
|
||||
|
||||
// Epics
|
||||
case 'epic_add':
|
||||
result = await epicAdd({
|
||||
title: a.title,
|
||||
project: a.project,
|
||||
description: a.description,
|
||||
});
|
||||
break;
|
||||
case 'epic_list':
|
||||
result = await epicList({
|
||||
project: a.project,
|
||||
status: a.status,
|
||||
limit: a.limit,
|
||||
});
|
||||
break;
|
||||
case 'epic_show':
|
||||
result = await epicShow(a.id);
|
||||
break;
|
||||
case 'epic_assign':
|
||||
result = await epicAssign({
|
||||
task_id: a.task_id,
|
||||
epic_id: a.epic_id,
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new Error(`Unknown tool: ${name}`);
|
||||
|
||||
Reference in New Issue
Block a user