← Back to Kontasks
MCP Tool Result Size Overflow Analysis
Investigating why konui_list_tasks returned 9.3MB of data
Output
⚠️ MCP Tool Result Size Overflow
What Happened
When you asked "Check the last kontask", I called konui_list_tasks(status: "completed") which returned:
9,358,519
characters
That's ~9.3 MB of JSON - the entire kontask history!
Root Cause
The konui_list_tasks MCP tool has no pagination. It returns ALL matching kontasks with their FULL context (including output HTML).
// Current behavior: konui_list_tasks({ status: "completed" }) // Returns: ALL completed kontasks with FULL context.output HTML // = thousands of kontasks × ~5KB each = 9.3MB
Solutions
Option A: Add limit parameter (Quick Fix)
Add limit parameter to MCP tool, default to 10-20 most recent.
konui_list_tasks({ status: "completed", limit: 10 })
Option B: Strip output from list response
Return only metadata in list, require separate call for full context.
// List returns: id, title, status, createdAt (no context.output) // Then call konui_get_task(id) for full context
Option C: Both (Recommended)
Add limit parameter AND strip large fields from list response.
Why It Worked Despite the Error
Claude Code saved the output to a temp file and told me to read it in chunks. I then used grep + tail on the original JSONL file instead, which worked fine.
What's Next?
Choose how to fix:
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
vibetools
Tags
kontasksmcpperformance
Created
3 Jan 2026, 5:35 pm
Updated
3 Jan 2026, 5:35 pm
Created By
claude
Raw Data
{
"id": "2a5273c3-662f-4f44-9dff-acea9b06dd45",
"type": "general",
"status": "completed",
"title": "MCP Tool Result Size Overflow Analysis",
"description": "Investigating why konui_list_tasks returned 9.3MB of data",
"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:#f87171;margin:0 0 16px 0;\">⚠️ MCP Tool Result Size Overflow</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;\">What Happened</h3>\n<p style=\"margin:0;line-height:1.6;\">When you asked \"Check the last kontask\", I called <code style=\"color:#e5c07b;\">konui_list_tasks(status: \"completed\")</code> which returned:</p>\n<div style=\"background:#1e1e1e;padding:12px;border-radius:4px;margin:12px 0;text-align:center;\">\n<span style=\"font-size:2rem;color:#f87171;font-weight:bold;\">9,358,519</span>\n<span style=\"color:#9ca3af;\">characters</span>\n</div>\n<p style=\"margin:0;color:#9ca3af;\">That's <strong style=\"color:#fff;\">~9.3 MB</strong> of JSON - the entire kontask history!</p>\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;\">Root Cause</h3>\n<p style=\"margin:0 0 12px 0;line-height:1.6;\">The <code style=\"color:#61afef;\">konui_list_tasks</code> MCP tool has <strong style=\"color:#fff;\">no pagination</strong>. It returns ALL matching kontasks with their FULL context (including <code>output</code> HTML).</p>\n<pre style=\"background:#1e1e1e;padding:12px;border-radius:4px;overflow-x:auto;margin:8px 0;\">\n<span style=\"color:#7f848e;\">// Current behavior:</span>\n<span style=\"color:#c678dd;\">konui_list_tasks</span>({ status: <span style=\"color:#98c379;\">\"completed\"</span> })\n<span style=\"color:#7f848e;\">// Returns: ALL completed kontasks with FULL context.output HTML</span>\n<span style=\"color:#7f848e;\">// = thousands of kontasks × ~5KB each = 9.3MB</span>\n</pre>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#98c379;margin:0 0 12px 0;\">Solutions</h3>\n\n<div style=\"background:#1e1e1e;padding:12px;border-radius:4px;margin:12px 0;border-left:3px solid #98c379;\">\n<h4 style=\"color:#98c379;margin:0 0 8px 0;\">Option A: Add limit parameter (Quick Fix)</h4>\n<p style=\"margin:0;color:#9ca3af;\">Add <code>limit</code> parameter to MCP tool, default to 10-20 most recent.</p>\n<pre style=\"margin:8px 0 0 0;\">\n<span style=\"color:#c678dd;\">konui_list_tasks</span>({ status: <span style=\"color:#98c379;\">\"completed\"</span>, <span style=\"color:#e5c07b;\">limit</span>: <span style=\"color:#d19a66;\">10</span> })\n</pre>\n</div>\n\n<div style=\"background:#1e1e1e;padding:12px;border-radius:4px;margin:12px 0;border-left:3px solid #61afef;\">\n<h4 style=\"color:#61afef;margin:0 0 8px 0;\">Option B: Strip output from list response</h4>\n<p style=\"margin:0;color:#9ca3af;\">Return only metadata in list, require separate call for full context.</p>\n<pre style=\"margin:8px 0 0 0;\">\n<span style=\"color:#7f848e;\">// List returns: id, title, status, createdAt (no context.output)</span>\n<span style=\"color:#7f848e;\">// Then call konui_get_task(id) for full context</span>\n</pre>\n</div>\n\n<div style=\"background:#1e1e1e;padding:12px;border-radius:4px;margin:12px 0;border-left:3px solid #c678dd;\">\n<h4 style=\"color:#c678dd;margin:0 0 8px 0;\">Option C: Both (Recommended)</h4>\n<p style=\"margin:0;color:#9ca3af;\">Add limit parameter AND strip large fields from list response.</p>\n</div>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#56b6c2;margin:0 0 12px 0;\">Why It Worked Despite the Error</h3>\n<p style=\"margin:0;line-height:1.6;\">Claude Code saved the output to a temp file and told me to read it in chunks. I then used <code style=\"color:#e5c07b;\">grep</code> + <code style=\"color:#e5c07b;\">tail</code> on the original JSONL file instead, which worked fine.</p>\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;\">Choose how to fix:</p>\n</div>\n</div>",
"choices": [
{
"label": "Fix MCP tool",
"value": "Add limit parameter to konui_list_tasks MCP tool and strip output from list response",
"primary": true
},
{
"label": "Quick workaround",
"value": "Just add a limit parameter - fastest fix"
},
{
"label": "Leave it",
"value": "The fallback to temp file worked fine, no fix needed"
}
],
"requestedAt": "2026-01-03T07:35:00Z",
"requestId": "0c496e7d-6741-4e9c-ae8f-523ad616e6a3"
},
"createdBy": "claude",
"createdAt": "2026-01-03T07:35:25.710Z",
"updatedAt": "2026-01-03T07:35:25.865Z",
"requestId": "0c496e7d-6741-4e9c-ae8f-523ad616e6a3",
"scope": "vibetools",
"tags": [
"kontasks",
"mcp",
"performance"
],
"targetUser": "claude"
}