Completed
on 3 Jan 2026, 5:38 pm

Output

✓ MCP Tool Optimized

Changes Made

konui/mcp/server.ts

1. Added limit parameter:
   - Default: 20 tasks
   - Max: 100 tasks
   - Sorted by most recent first

2. Stripped large context fields:
   - KEPT: requestId, choices (small, useful)
   - REMOVED: output, layout, data (huge HTML)

Before vs After

Metric Before After
Tasks returned ALL (~1000+) 20 (default)
Per-task size ~5-50KB (with HTML) ~500 bytes
Total response 9.3 MB ~10 KB

Will This Speed Up Most Turns?

Short answer: Mostly no, but it prevents catastrophic slowdowns.

This fix addresses the specific case where konui_list_tasks returns massive data. Most turn latency comes from:

  • Claude spawn time (~0.5-2s) - Fixed by session reuse
  • Claude thinking (1-30s) - The API call itself
  • Tool execution - Reading files, searches, etc.

The MCP fix eliminates the 9.3MB response spike that caused the error you saw, but it won't make normal turns faster.

New API

// Old (dangerous):
konui_list_tasks({ status: "completed" })  // 9.3MB!

// New (safe):
konui_list_tasks({ status: "completed" })  // 20 most recent, ~10KB
konui_list_tasks({ status: "approved", limit: 5 })  // 5 most recent

What's Next?

The MCP server needs to restart for changes to take effect (requires Claude Code restart or reconnect).

Quick Actions

Original Request

No layout configured

Details

Type General
Status Completed
Scope vibetools
Tags mcpperformancekontasks
Created 3 Jan 2026, 5:38 pm
Updated 3 Jan 2026, 5:38 pm
Created By claude

Raw Data

{
  "id": "3a24c477-4532-47bd-8c12-3d9fe853edd7",
  "type": "general",
  "status": "completed",
  "title": "MCP Tool Optimization Complete",
  "description": "Fixed konui_list_tasks to limit results and strip large context fields",
  "context": {
    "output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:'Segoe UI','Helvetica Neue',sans-serif;\">\n<h2 style=\"color:#4ade80;margin:0 0 16px 0;\">✓ MCP Tool Optimized</h2>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#fff;margin:0 0 12px 0;\">Changes Made</h3>\n<pre style=\"background:#1e1e1e;padding:12px;border-radius:4px;overflow-x:auto;margin:0;line-height:1.6;\">\n<span style=\"color:#e5c07b;\">konui/mcp/server.ts</span>\n\n<span style=\"color:#98c379;\">1. Added limit parameter:</span>\n   <span style=\"color:#7f848e;\">- Default: 20 tasks</span>\n   <span style=\"color:#7f848e;\">- Max: 100 tasks</span>\n   <span style=\"color:#7f848e;\">- Sorted by most recent first</span>\n\n<span style=\"color:#98c379;\">2. Stripped large context fields:</span>\n   <span style=\"color:#7f848e;\">- KEPT: requestId, choices (small, useful)</span>\n   <span style=\"color:#f87171;\">- REMOVED: output, layout, data (huge HTML)</span>\n</pre>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#61afef;margin:0 0 12px 0;\">Before vs After</h3>\n<table style=\"width:100%;border-collapse:collapse;\">\n<tr style=\"border-bottom:1px solid #444;\">\n<th style=\"padding:8px;text-align:left;color:#9ca3af;\">Metric</th>\n<th style=\"padding:8px;text-align:right;color:#f87171;\">Before</th>\n<th style=\"padding:8px;text-align:right;color:#4ade80;\">After</th>\n</tr>\n<tr style=\"border-bottom:1px solid #333;\">\n<td style=\"padding:8px;\">Tasks returned</td>\n<td style=\"padding:8px;text-align:right;color:#f87171;\">ALL (~1000+)</td>\n<td style=\"padding:8px;text-align:right;color:#4ade80;\">20 (default)</td>\n</tr>\n<tr style=\"border-bottom:1px solid #333;\">\n<td style=\"padding:8px;\">Per-task size</td>\n<td style=\"padding:8px;text-align:right;color:#f87171;\">~5-50KB (with HTML)</td>\n<td style=\"padding:8px;text-align:right;color:#4ade80;\">~500 bytes</td>\n</tr>\n<tr>\n<td style=\"padding:8px;\">Total response</td>\n<td style=\"padding:8px;text-align:right;color:#f87171;\">9.3 MB</td>\n<td style=\"padding:8px;text-align:right;color:#4ade80;\">~10 KB</td>\n</tr>\n</table>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#e5c07b;margin:0 0 12px 0;\">Will This Speed Up Most Turns?</h3>\n<p style=\"margin:0 0 12px 0;line-height:1.6;\"><strong style=\"color:#fff;\">Short answer: Mostly no, but it prevents catastrophic slowdowns.</strong></p>\n<p style=\"margin:0 0 8px 0;line-height:1.6;color:#9ca3af;\">This fix addresses the specific case where <code style=\"color:#e5c07b;\">konui_list_tasks</code> returns massive data. Most turn latency comes from:</p>\n<ul style=\"margin:0;padding-left:20px;line-height:1.8;color:#9ca3af;\">\n<li><strong style=\"color:#fff;\">Claude spawn time</strong> (~0.5-2s) - Fixed by session reuse</li>\n<li><strong style=\"color:#fff;\">Claude thinking</strong> (1-30s) - The API call itself</li>\n<li><strong style=\"color:#fff;\">Tool execution</strong> - Reading files, searches, etc.</li>\n</ul>\n<p style=\"margin:12px 0 0 0;line-height:1.6;\">The MCP fix eliminates the <span style=\"color:#f87171;\">9.3MB response spike</span> that caused the error you saw, but it won't make normal turns faster.</p>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#c678dd;margin:0 0 12px 0;\">New API</h3>\n<pre style=\"background:#1e1e1e;padding:12px;border-radius:4px;overflow-x:auto;margin:0;\">\n<span style=\"color:#7f848e;\">// Old (dangerous):</span>\n<span style=\"color:#c678dd;\">konui_list_tasks</span>({ status: <span style=\"color:#98c379;\">\"completed\"</span> })  <span style=\"color:#f87171;\">// 9.3MB!</span>\n\n<span style=\"color:#7f848e;\">// New (safe):</span>\n<span style=\"color:#c678dd;\">konui_list_tasks</span>({ status: <span style=\"color:#98c379;\">\"completed\"</span> })  <span style=\"color:#4ade80;\">// 20 most recent, ~10KB</span>\n<span style=\"color:#c678dd;\">konui_list_tasks</span>({ status: <span style=\"color:#98c379;\">\"approved\"</span>, <span style=\"color:#e5c07b;\">limit</span>: <span style=\"color:#d19a66;\">5</span> })  <span style=\"color:#4ade80;\">// 5 most recent</span>\n</pre>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;\">\n<h4 style=\"margin:0 0 8px 0;color:#fff;\">What's Next?</h4>\n<p style=\"color:#9ca3af;margin:0;\">The MCP server needs to restart for changes to take effect (requires Claude Code restart or reconnect).</p>\n</div>\n</div>",
    "choices": [
      {
        "label": "Test it now",
        "value": "Test the konui_list_tasks MCP tool to verify the fix works - call it with status=completed",
        "primary": true
      },
      {
        "label": "Focus on telemetry",
        "value": "Let's move on to testing the telemetry system we built earlier"
      },
      {
        "label": "Done for now",
        "value": "Good progress, let's wrap up"
      }
    ],
    "requestedAt": "2026-01-03T07:45:00Z",
    "requestId": "004b9df6-5552-486f-8459-5663d14a0918"
  },
  "createdBy": "claude",
  "createdAt": "2026-01-03T07:38:40.874Z",
  "updatedAt": "2026-01-03T07:38:41.026Z",
  "requestId": "004b9df6-5552-486f-8459-5663d14a0918",
  "scope": "vibetools",
  "tags": [
    "mcp",
    "performance",
    "kontasks"
  ],
  "targetUser": "claude"
}
DashboardReportsKontasksSessionsTelemetryLogs + Go