Progressive disclosure
A full tool result or search hit often holds far more than the next step needs. Each character in the window can be sent again on later model calls. Progressive disclosure compacts what the agent sees, and keeps a full copy on disk when it fits the mount limits.
How Stash does it
Section titled “How Stash does it”Stash writes each result as a file when it fits the result and cache limits. It then shows the agent a compacted view. A result that is too large to store still gets a preview.
A small result is compacted without loss. Up to 20,000 characters, the agent sees the whole result. JSON prints as a compact table that writes each field name once and keeps every value.
A large result becomes a preview. Past that size, the agent sees a preview. When
Stash saves the full result, the preview names its path and says how to read the rest
with jq, grep, or sed. When the result does not fit, the preview says that Stash
did not save it.
This compaction works for each configured MCP server. You do not need a compaction rule for each tool.
With first-party sources. Each first-party source has an opinionated view of its own, so the agent gets more from fewer characters:
- A memory record shows its gist, such as the topics of a summary.
- A knowledge-base passage gets more room when it ranks higher.
- A web search fetches each cited page, and saves it as a Markdown file.
- An AWS Context search saves the answer, its context, and its citations in one file.
Example: a JSON result
Section titled “Example: a JSON result”The ticketing server returns INC-4412 with its comments as JSON:
{"id": "INC-4412", "status": "open", "comments": [ {"author": "oncall", "kind": "update", "text": "p99 at 1.4 s after deploy 2026-11-20.3"}, {"author": "oncall", "kind": "update", "text": "rolled back, p99 back to 300 ms"}, {"author": "sre-lead", "kind": "update", "text": "pool size change is the suspect"}]}The agent sees the same data as a table. The field names show once, and a value that is the same in every row shows once:
[table of the JSON, every value kept: ...]id: "INC-4412"status: "open"comments[3]{author,text} same {"kind":"update"}["oncall","p99 at 1.4 s after deploy 2026-11-20.3"]["oncall","rolled back, p99 back to 300 ms"]["sre-lead","pool size change is the suspect"]Stash uses a table only when it saves at least 300 characters, so a real ticket with many comments gets one. With 400 comments, the agent sees the first rows and a line that says how many it left out. The preview also names the full-result path when Stash saves the file.
Try it
Section titled “Try it”Start with a ready ops mount whose ticketing MCP source exposes a get_ticket tool.
The One interface example shows the source config and its
prerequisites.
stash tool call ops ticketing/get_ticket --input '{"id": "INC-4412"}'jq '.comments[-3:]' \ /tmp/ops-context/mcp/ticketing/_tools_results/get_ticket/*/content/1.jsonA follow-up question about INC-4412 can read the saved file without a remote call while the file is in the cache.
Next steps
Section titled “Next steps”- Managed workspace: how long the files stay.
- MCP source: connect a remote or a local MCP server.
stash tool call: every rule of the view.