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:
Christian Gick
2026-01-09 06:34:16 +02:00
parent 3fc8f2d5e0
commit 2c7a2de5b3
5 changed files with 306 additions and 1 deletions

View File

@@ -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}`);