Skip to content
Agentmart
Submit a tool

mcp-overflow-delegate-summary

Use when an MCP tool result is dumped to a tool-results/*.txt file because it exceeded the token cap — delegate the read+summarize to a general-purpose…

Skill by hjr15

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/hjr15-mcp-overflow-delegate-summary

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when an MCP tool result is dumped to a tool-results/*.txt file because it exceeded the token cap — delegate the read+summarize to a general-purpose subagent (or jq the file for targeted extraction) so the raw payload stays out of the main context.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/mcp-overflow-delegate-summary

What's inside

Skill name
mcp-overflow-delegate-summary
Description
Use when an MCP tool result is dumped to a tool-results/*.txt file because it exceeded the token cap — delegate the read+summarize to a general-purpose subagent (or jq the file for targeted extraction) so the raw payload stays out of the main context.
License
MIT
Instructions
51 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# MCP Overflow → Delegate Summary

## Overview

MCP tool results that exceed the token cap are spilled to a `tool-results/*.txt` file with a message telling you to read it in chunks. **Don't read it back into the main context** — reading chunks re-introduces the bytes that were too big to fit. Either delegate a full read+summarize to a subagent, or `jq` the file for a targeted extraction.

## When to Use

- Any MCP tool result returns "Error: result (X characters) exceeds maximum allowed tokens. Output has been saved to /path/to/tool-results/*.txt"
- The file is JSON/structured data and you need an extract or summary
- The data would otherwise need manual offset/limit Read skimming

## Two paths

**Targeted extraction (counts, one field, a filter) → `jq` from the main context.** Faster than a subagent round-trip. The file is on disk; parse it directly:

```bash
jq -r '.issues.nodes[] | "\(.key) [\(.fields.issuetype.name)] parent=\(.fields.parent.key // "NONE")"' /path/to/tool-results/X.txt
```

**Multi-page bulk result (a whole-project query that overflows on *every* page) → paginate at the edge, reduce each page to TSV, then analyse offline.** Never re-read a giant JSON page into context. Loop: probe structure once (`jq 'type, (.issues.nodes|length), .issues.pageInfo' <file>`); per page append a compact TSV (`jq -r '.issues.nodes[] | [.key, .fields.status.name, (.fields.parent.key//""), ...] | @tsv' <file> >> all.tsv`); paginate via `pageInfo.endCursor` / `nextPageToken` until `hasNextPage=false`; then run the actual analysis (orphans, roll-up consistency, staleness) with `python3`/`awk` over the small `all.tsv`. Scriptable and repeatable, and the raw payload never enters context.

**Full-content read + structured summary → delegate to a `general-purpose` subagent.** The subagent's full read sits in *its* context, which the orchestrator discards; only the summary returns. Dispatch with an explicit, structured prompt:

- Give it the **full file path** verbatim
- Tell it what fields to extract (list them exactly)
- Specify return shape — compact markdown table, JSON, prose paragraph
- Note that JSON files do NOT chunk safely — they must be parsed whole
- Cap return length explicitly ("under 300 words", "table only")
- Tell it explicitly NOT to make decisions / recommendations — just inventory

Example prompt shape:

```
Read /path/to/tool-results/X.txt. It's a JSON result from MCP tool Y listing N items.
For each item extract <fields>. Return a markdown table grouped by <axis>, columns
<list>. Include EVERY item — no sampling. Then add a <150-word patterns paragraph.
Do NOT recommend; just inventory.
```

## Gotcha — narrowing `fields` doesn't shrink the response

`searchJiraIssuesUsingJql` (and similar list tools) do **not** trim the payload when you pass a narrow `fields` allowlist — descriptions, the bulk of the size, come back regardless. Shrink the result by tightening the JQL / lowering the result count, not by trimming `fields`.

## Why subagent, not me

- Main-context tokens stay clean for downstream decisions
- The subagent's full read is discarded with its context
- Forces an explicit extract spec — better signal-to-noise than a free-form skim

From hjr15/claude-kit, MIT.

More from hjr15/claude-kit

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jul 18, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from hjr15

Cite this page

mcp-overflow-delegate-summary skill. Agent Mart. https://agentmart.dev/skills/hjr15-mcp-overflow-delegate-summary (last updated 2026-10-24)