tuna-agent 0.1.131 → 0.1.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp/idea-server.js +24 -0
- package/package.json +1 -1
package/dist/mcp/idea-server.js
CHANGED
|
@@ -144,6 +144,18 @@ const TOOLS = [
|
|
|
144
144
|
required: ['idea_id'],
|
|
145
145
|
},
|
|
146
146
|
},
|
|
147
|
+
{
|
|
148
|
+
name: 'merge_ideas',
|
|
149
|
+
description: 'Merge similar/duplicate ideas into one primary idea. Combines tags, competitors, notes, and takes the highest score. Merged ideas are archived automatically.',
|
|
150
|
+
inputSchema: {
|
|
151
|
+
type: 'object',
|
|
152
|
+
properties: {
|
|
153
|
+
primary_id: { type: 'string', description: 'The ID of the primary idea to keep (others will be merged into this one)' },
|
|
154
|
+
merge_ids: { type: 'string', description: 'Comma-separated list of idea IDs to merge into the primary idea' },
|
|
155
|
+
},
|
|
156
|
+
required: ['primary_id', 'merge_ids'],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
147
159
|
{
|
|
148
160
|
name: 'bulk_update_ideas',
|
|
149
161
|
description: 'Update multiple ideas at once. Useful for batch status changes, scoring, or categorization.',
|
|
@@ -340,6 +352,18 @@ async function handleToolCall(config, toolName, args) {
|
|
|
340
352
|
const data = await apiCall(config, 'PUT', `/agent-idea/${args.idea_id}/archive`, {});
|
|
341
353
|
return { content: [{ type: 'text', text: `Idea "${data.name}" archived (ID: ${data._id})` }] };
|
|
342
354
|
}
|
|
355
|
+
case 'merge_ideas': {
|
|
356
|
+
if (!args.primary_id || !args.merge_ids) {
|
|
357
|
+
return { content: [{ type: 'text', text: 'Error: primary_id and merge_ids are required' }], isError: true };
|
|
358
|
+
}
|
|
359
|
+
const mergeBody = {
|
|
360
|
+
primary_id: args.primary_id,
|
|
361
|
+
merge_ids: args.merge_ids.split(',').map((id) => id.trim()),
|
|
362
|
+
};
|
|
363
|
+
const mergeData = await apiCall(config, 'POST', '/agent-idea/merge', mergeBody);
|
|
364
|
+
const names = mergeData.merged_names.join(', ');
|
|
365
|
+
return { content: [{ type: 'text', text: `Merged ${mergeData.merged_count} idea(s) into "${mergeData.primary.name}" (ID: ${mergeData.primary._id}).\nArchived: ${names}` }] };
|
|
366
|
+
}
|
|
343
367
|
case 'bulk_update_ideas': {
|
|
344
368
|
if (!args.idea_ids) {
|
|
345
369
|
return { content: [{ type: 'text', text: 'Error: idea_ids is required' }], isError: true };
|