tuna-agent 0.1.98 → 0.1.99
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 +5 -4
- package/package.json +1 -1
package/dist/mcp/idea-server.js
CHANGED
|
@@ -274,7 +274,8 @@ async function handleToolCall(config, toolName, args) {
|
|
|
274
274
|
}
|
|
275
275
|
case 'list_ideas': {
|
|
276
276
|
const params = new URLSearchParams();
|
|
277
|
-
|
|
277
|
+
if (args.agent_id)
|
|
278
|
+
params.set('agent_id', args.agent_id);
|
|
278
279
|
if (args.status)
|
|
279
280
|
params.set('status', args.status);
|
|
280
281
|
if (args.category)
|
|
@@ -284,13 +285,13 @@ async function handleToolCall(config, toolName, args) {
|
|
|
284
285
|
if (args.page)
|
|
285
286
|
params.set('page', args.page);
|
|
286
287
|
if (args.limit)
|
|
287
|
-
params.set('limit', args.limit);
|
|
288
|
+
params.set('limit', args.limit || '100');
|
|
288
289
|
if (args.sort_by)
|
|
289
290
|
params.set('sort_by', args.sort_by);
|
|
290
291
|
if (args.sort_order)
|
|
291
292
|
params.set('sort_order', args.sort_order);
|
|
292
293
|
const data = await apiCall(config, 'GET', `/agent-idea?${params.toString()}`);
|
|
293
|
-
const ideas = data.
|
|
294
|
+
const ideas = data.items || [];
|
|
294
295
|
if (ideas.length === 0) {
|
|
295
296
|
return { content: [{ type: 'text', text: 'No ideas found.' }] };
|
|
296
297
|
}
|
|
@@ -318,7 +319,7 @@ async function handleToolCall(config, toolName, args) {
|
|
|
318
319
|
if (args.limit)
|
|
319
320
|
params.set('limit', args.limit);
|
|
320
321
|
const data = await apiCall(config, 'GET', `/agent-idea/search?${params.toString()}`);
|
|
321
|
-
const ideas = data.
|
|
322
|
+
const ideas = data.items || [];
|
|
322
323
|
if (ideas.length === 0) {
|
|
323
324
|
return { content: [{ type: 'text', text: `No ideas found matching "${args.query}".` }] };
|
|
324
325
|
}
|