Verify a Shortened Tool Result With Strands Stash MCP

Use Strands Stash MCP and jq to recover a rollback marker from a saved ticket response, distinguish missing files from tool errors, and clean up the mount.

Strands Stash MCP preview overlaid on the saved ticket, where the final on-call comment reveals checkout-2026-11-20.2.Strands Stash MCP preview overlaid on the saved ticket, where the final on-call comment reveals checkout-2026-11-20.2.
Illustrative INC-4412. The preview shows the earlier deploy and points to the saved JSON. A local read recovers the rollback marker from comment 400. Based on the Strands Agents MCP source and progressive disclosure documentation.

The preview of staging ticket INC-4412 shows that checkout latency rose after a deploy. Your handoff needs the exact version the on-call engineer rolled back to. The preview ends before that comment. With Strands Stash MCP, you can follow the path printed for that call, pull the on-call comment out of the saved JSON with jq, and check it against the staging fixture before you write the handoff.

You’ll need Stash and jq on a supported macOS or Linux host, an approved read-only staging ticket MCP server over Streamable HTTP, and permission to keep a temporary local copy of its synthetic responses. The example assumes a get_ticket tool that accepts an id and returns one JSON content block. The fixtures and expected observations below are illustrative. They give you a known answer to compare with your own run. If you still need to confirm that the server connects and exposes the intended tool, start with the MCP Inspector guide.

Strands Agents introduced Stash on December 1, 2026. The release describes progressive disclosure, where Stash can save a full supported tool result within configured limits and send a bounded preview with a path to the rest. The receipt in this exercise is the metadata and JSON from one specific call. Strands Agents release announcement

The Strands Agents article introducing Strands Stash.
The Strands Agents project introduces its filesystem workspace for agent context in the publisher’s release article. · Original source

Prepare two tickets with a known answer

  1. Give the fixture below to the owner of your approved staging server, or load it using your existing staging fixture mechanism if you own that mechanism. Keep the credential you will use for the exercise scoped to reads. Each file contains the JSON object the tool should return in one content block. The staging owner supplies the protocol wrapper the server uses.
  2. Return INC-4411 as the small control and INC-4412 as the long result. Keep the comments in the generated array order. Reserve INC-4499 as an absent ID if the owner confirms that this server reports an MCP tool error for an unknown ticket.
  3. Confirm that the staging tool serves the entire long fixture in one result. If your server paginates comments, arrange for the fixture tool to return all 400 in one response before running this example. A saved response only covers what that invocation returned.

This POSIX shell block generates both fixture files in your working directory. Use a fresh directory outside the mount so the cleanup step leaves the input files available. The generator writes synthetic tickets to disk for your existing fixture loader.

cat > INC-4411.json <<'JSON'
{"id":"INC-4411","status":"open","comments":[{"author":"oncall","kind":"update","text":"Checkout baseline confirmed at 300 ms."}]}
JSON

{
  printf '%s\n' '{"id":"INC-4412","status":"open","comments":['
  printf '%s\n' '{"author":"oncall","kind":"update","text":"p99 at 1.4 s after deploy checkout-2026-11-20.3"},'
  row=2
  while [ "$row" -lt 400 ]; do
    printf '{"author":"observer","kind":"update","text":"Staging sample %03d: checkout probes still show elevated latency while the team compares request timings with the baseline."},\n' "$row"
    row=$((row + 1))
  done
  printf '%s\n' '{"author":"oncall","kind":"update","text":"Rollback target checkout-2026-11-20.2; p99 back to 300 ms."}'
  printf '%s\n' ']}'
} > INC-4412.json

The small ticket gives you one readable comment and a distinct ID. The large ticket begins with checkout-2026-11-20.3, the deploy preceding the regression. The last comment is the only one that names the rollback target. The intervening 398 comments vary their sample number so each text value is distinct even though the author and kind repeat. Their text alone exceeds 20,000 characters, and the complete JSON is far below the scratch mount’s per-file limit. This makes the fixture sensitive to a reader or agent stopping at the preview. Strands Agents progressive disclosure

Before touching the mount, run the two filters below against INC-4412.json in the fixture directory. The first should return two comments and the second should return an array of three. The final object in that array should also be the second on-call comment from the first query. This establishes what you expect to recover even if the staging server later sorts or drops rows. The official Stash examples show both the author filter and the terminal slice. Strands Agents MCP source · Strands Agents progressive disclosure

jq '.comments[] | select(.author == "oncall")' INC-4412.json
jq '.comments[-3:]' INC-4412.json

Check that the first command prints the earlier deploy and the rollback as distinct objects. If the final object differs between the two outputs on your local files, fix the fixture before trying the remote call. If the outputs agree locally and differ later on the saved result, there is a concrete question for the server owner about response shape, content or ordering. For a broader example of using fixed inputs to evaluate an agent task, see the synthetic company fixture guide.

Create the scratch mount and check the source

  1. Pick a dedicated, access-controlled mount directory. The example uses /tmp/stash-ticket-verify. If your host needs a different location, use an absolute POSIX path and carry the change through to the schema path. Use an empty or missing directory that neither contains nor sits inside the Stash data root or another mount point. Put the TOML and fixture files elsewhere. Strands Agents mount guide · Strands Agents configuration reference
  2. Save the following as ticket-verify.toml and replace the example URL with the approved Streamable HTTP endpoint. The example uses bearer authentication from TICKETING_MCP_TOKEN. Make that variable available through your normal credential mechanism before the daemon starts. If a daemon is already running with a different environment, use an isolated test session with dedicated STASH_DATA_ROOT and STASH_CONTROL_ROOT, keeping both values consistent for every Stash command. Strands Agents configuration reference · Strands Agents command reference
  3. Create the mount, wait for ready, then look for ticketing (mcp): started and the ticketing/get_ticket row. Confirm the actual schema before sending either ticket ID. Strands Agents command reference
mount_point = "/tmp/stash-ticket-verify"
cache_max_bytes = 10000000
expiry_interval_seconds = 0

[sources.ticketing]
kind = "mcp"
description = "Read-only staging checkout incident fixtures"
url = "https://tickets.example.com/mcp"
auth = { bearer = { env = "TICKETING_MCP_TOKEN" } }
stash create ticket-verify --config ticket-verify.toml
stash status ticket-verify
# Expected after startup: state: ready and ticketing (mcp): started.
stash tool list ticket-verify --source ticketing
# Expected: a ticketing/get_ticket row with its schema path.

Run the status command again while the mount is starting. A zero exit from stash create can accompany a mount that is still starting or one that subsequently fails. Check for state: ready with the named MCP source started. If the mount has failed, read the status error. If a source failed to start, inspect _sources/ticketing.md when available and resolve the listed error before trying the tool. Strands Agents mount guide · Strands Agents command reference

The list command shows the address and a schema path. For this configuration the expected schema path is /tmp/stash-ticket-verify/mcp/ticketing/_tools/get_ticket.json. Open the file and look for the id argument. The list comes from source startup, so seeing the row establishes which tool was registered. A bearer token can expire after registration. When the first call reports an authorization problem, check the approved endpoint and how the daemon obtained its credential. The daemon reads environment values at startup. If the error instead concerns a tool the server added after startup, refresh the scratch mount’s tool list by recreating it after preserving any evidence you need. Strands Agents MCP source · Strands Agents command reference

The TOML chooses one source and disables time-based expiry for the exercise. The cache can still evict files when it needs room, so read the result while it is available. The description identifies the fixture source for people reading the mount. The staging server and its credentials enforce read-only access. Stash’s MCP source can invoke the tools that server exposes. This exercise uses the CLI directly, so mount creation needs no harness attachment. If you later pass the result path to a harness, make sure that harness can read the intended directory. The MCP filesystem guide covers a related case where directory exposure is itself part of the setup. Strands Agents configuration reference · Strands Agents managed workspace

Compare the small response with the preview

  1. Call get_ticket for INC-4411 and locate its id, status and single comment in the printed view. This establishes that the staging fixture is reachable and that the response has the intended fields.
  2. Call the same tool for INC-4412. Look first for a tool error or a notice about an unsaved result. On the expected saved path, look for the partial view and copy the result directory from that call. Keep the output until you have finished reading the file.
stash tool call ticket-verify ticketing/get_ticket --input '{"id":"INC-4411"}'
stash tool call ticket-verify ticketing/get_ticket --input '{"id":"INC-4412"}'

The documented output budget is 20,000 characters. A small JSON result can appear as a compact table that keeps every value, or print as JSON when table formatting saves too little space. For the small control, the absence of a directory line on an otherwise ordinary successful response is expected. The CLI documents when it prints the folder upfront, including a partial view, a failure, multiple files, or a nontext file. Strands Agents command reference · Strands Agents progressive disclosure

If the control returns a different ticket or an unexpected body, check the staging fixture mapping while the response is small enough to inspect directly. Both calls use the same mount, source, tool and argument name. Only the ticket ID changes. When the control behaves as expected and the long response announces a partial view, the change in output format is consistent with the size of the long fixture. You still need the saved payload to check the answer.

For the large ticket, expect early comments and a notice that further rows were left out, alongside the path when the complete result was saved. The first version string in the preview belongs to the deploy under investigation. Quoting it as the rollback target would reverse two different events. The omitted tail is where this fixture puts the answer. Stash can also name a paging field such as next_token when the server supplies one. In a paginated integration, reading a result file recovers the saved response from that call. Use the server’s documented paging input to retrieve another page. This fixture assumes a single response. Strands Agents progressive disclosure · Strands Agents command reference

Three stat tiles show the Stash CLI preview budget, whole tool result save limit and per-file cache percentage.Three stat tiles show the Stash CLI preview budget, whole tool result save limit and per-file cache percentage.
Strands Stash MCP applies a 20,000-character output budget, a 32 MiB whole-result limit and a per-file ceiling of 25% of the configured cache. Strands Agents command and configuration references, read December 2, 2026.

Verify the rollback marker in the saved JSON

  1. Use the directory printed by the INC-4412 call. Paste that directory when prompted by the shell block below, without shell quotes and without appending the filename. For the fixture’s single JSON block, the path inside it is content/1.json.
  2. Read call_metadata.json first. Compare the saved input ID with INC-4412 and check the error information against the terminal output. Then run the author filter and inspect the end of the comments array. Strands Agents MCP source · Strands Agents mount guide
  3. Record the marker after seeing the exact value in the on-call comment from the matching call. Preserve the distinction between the earlier deploy version and the later rollback target. If ordering differs, the author filter can still find the comment. Record the ordering discrepancy against the fixture.
printf '%s\n' 'Paste the INC-4412 result directory printed by Stash:'
IFS= read -r result_dir
jq '.' "$result_dir/call_metadata.json"
jq '.comments[] | select(.author == "oncall")' "$result_dir/content/1.json"
jq '.comments[-3:]' "$result_dir/content/1.json"

The per-call directory sits under mcp/ticketing/_tools_results/get_ticket/. Its final component includes the UTC call time and a hash derived from the tool and input. A wildcard can expand to the small control, a previous version of the large fixture, or a later attempt. An earlier file might still contain the answer you hoped to see even after the current call fails. Keep the path from the current call with its output so you can identify both files by their shared parent directory. When the directory ends in a slash, the quoted paths still refer to the same files. Strands Agents command reference

For this fixture, the author filter should print two JSON objects in the following order. The slice should contain two observer rows followed by the second object. These are illustrative expected observations. Use the result path and observations from your own terminal in the handoff.

{"author":"oncall","kind":"update","text":"p99 at 1.4 s after deploy checkout-2026-11-20.3"}
{"author":"oncall","kind":"update","text":"Rollback target checkout-2026-11-20.2; p99 back to 300 ms."}
Input Action Expected result
task:stash-ticket-01, control INC-4411 with one on-call comment Run stash tool call ticket-verify ticketing/get_ticket --input '{"id":"INC-4411"}' Illustrative result includes INC-4411, open and the full 300 ms baseline comment.
task:stash-ticket-01, INC-4412 with 400 comments and the marker in comment 400 Run stash tool call ticket-verify ticketing/get_ticket --input '{"id":"INC-4412"}', then run the author filter above against that call’s content/1.json. Illustrative partial view names the saved result. The author filter returns the rollback text containing checkout-2026-11-20.2 after the earlier deploy comment.
task:stash-ticket-01, absent INC-4499 on a staging server configured to report an MCP tool error Run stash tool call ticket-verify ticketing/get_ticket --input '{"id":"INC-4499"}' and immediately run printf '%s\n' "$?" in the same shell. Illustrative flagged response shows [the tool reported an error] and the command exit status is 0. Leave the rollback target unverified.

If the file cannot open, verify the exact directory and filename in that call’s output. If jq reports a parsing or shape problem, inspect the file and the block information in the metadata. The filter assumes a JSON ticket object with .comments at the top level. Some servers return several blocks or put JSON inside a string. Stash documents that a preview can provide a read-back hint for the nested case. If both queries succeed but there is no matching oncall comment, compare the saved payload with the fixture and check whether the server returned a different author value or a smaller set of comments. Until you resolve the mismatch, mark the rollback target unverified for that call. Strands Agents command reference

If the final comment names a different version, keep the exact returned wording in your notes and check the fixture version with the staging owner. A successful JSON read establishes that you could inspect the response. The input in the metadata and the comment in the payload establish what this specific call returned. If handing off to someone who only saw the shortened transcript, include the relevant comment and its call identifier so they can find the evidence. The fleet replay guide covers how to reconstruct what an agent saw and did across sessions.

Diagnose an unsaved result or a tool error

Observation from this invocation Next action
Partial view names a saved JSON file and the call shows no error Open that file and validate the input and expected comment. The preview can leave rows out while the saved object keeps them.
Preview explicitly says the result or file was unsaved Treat the omitted detail as unavailable locally from this call. Check the cache size and ask the staging owner for a smaller supported response or an approved direct read of the source.
A formerly readable path is gone Check the original output for the save notice and consider expiry, eviction or manual compaction since the call. A new read can return a different snapshot.
[the tool reported an error], possible error: …, or error: … precedes the body Inspect the error and the call metadata when available. Establish what the server answered before using any data in the body.
Exit 1 from stash tool call Check the serving mount, source, tool name and JSON input. The documented exit 1 cases are calls Stash did not make.

A Stash get_ticket response branches into three conditions: saved partial view without a failure indication, unsaved result, or tool error.A Stash get_ticket response branches into three conditions: saved partial view without a failure indication, unsaved result, or tool error.
The printed outcome determines whether to read the current saved JSON or diagnose the missing evidence. Based on the Strands Agents CLI reference.

For a controlled storage-limit comparison, have the fixture owner expose an optional read-only case that returns one ASCII JSON content block with a text value of 2,600,000 characters. With cache_max_bytes = 10000000, the per-file ceiling is 2,500,000 bytes, so that value alone exceeds it. The response is well below the separate 32 MiB whole-result ceiling when the server returns only this block with ordinary framing. The expected observation is a preview with an explicit unsaved-file indication. This optional case depends on the staging server accepting and returning the fixture at that size. If the server has its own lower response cap, use the documented unsaved indication to diagnose a naturally occurring case. Strands Agents configuration reference · Strands Agents progressive disclosure

For an oversized file, clearing other cached files leaves the per-file ceiling at the configured percentage. A fresh mount with a larger approved cache raises the per-file ceiling in bytes. The 32 MiB whole-result ceiling still applies. The CLI forbids changing cache_max_bytes in place with stash update. To reuse the same mount name with a different budget, preserve any receipt you need, delete the mount with --remove-data, and create it again with the new configuration. If the file was originally saved and later evicted, keep the original call’s outcome in your notes and record the time of any distinct replacement call. Strands Agents command reference · Strands Agents managed workspace

For the error branch, use the absent INC-4499 probe only if the staging contract says it will send a tool error for that ID. A server that returns an ordinary empty object for unknown tickets would exercise a different case. Stash makes one attempt per invocation. Its exit status can be zero for a tool that ran and reported an error, or for a call that got no answer. Check the printed failure line and metadata before deciding whether to make another read. If the error indicates a timeout, the CLI documentation says the server may still be running the request. The MCP timeout guide covers harness-side timeout settings outside this CLI exercise. Strands Agents command reference

Preserve the receipt and remove the scratch data

  1. If the result needs to survive this exercise, copy the current call’s call_metadata.json and content/1.json to an approved restricted location outside the mount. Reopen the copies there and repeat the ID and comment checks before cleanup. If readers only need the verified answer, record the exact comment and call identifier in the handoff and dispose of the temporary payload according to your retention policy.
  2. To stop and unregister the named mount while keeping its data temporarily, run stash delete ticket-verify and review the interactive prompt. Confirm with stash ls that ticket-verify is absent. You can proceed directly to the next step if you are ready to remove the data immediately.
  3. When ready to erase the scratch copy, run stash delete ticket-verify --remove-data in a terminal and confirm the displayed deletion applies to the dedicated path. Run stash ls and check that the scratch mount directory is gone. The deletion option also works on retained data for a name that is no longer mounted. Strands Agents command reference · Strands Agents mount guide
stash delete ticket-verify
stash ls
# Run this when the retained copy is no longer needed.
stash delete ticket-verify --remove-data
stash ls

The first deletion preserves the local data and is reversible by creating the mount again with the same name and config. The second removes the mount point and everything in it, including files Stash did not write, as well as the mount’s directory in the data root. Keep any intentionally preserved copy under its own retention policy. Stopping the daemon suspends all mounts it serves and leaves data in place, so use the named deletion for this scratch mount even if your daemon also serves other work. The server remains the authority for the staging ticket and keeps its own data. Strands Agents command reference · Strands Agents release announcement

An illustrative handoff after a successful check would say that ticketing/get_ticket returned INC-4412, whose final on-call comment records a rollback to checkout-2026-11-20.2 and says p99 returned to 300 ms. The earlier checkout-2026-11-20.3 entry identifies the deploy preceding the regression. In your run, add the actual call directory name or the approved receipt location. If the tool failed or the file was unavailable, report that observation and leave the rollback target unverified. The handoff records what the ticket said at retrieval time. The staging source can change after that call, and Stash never refreshes the saved tool result in place. Strands Agents managed workspace

Sources

  1. Strands Agents release announcement
  2. Strands Agents MCP source
  3. Strands Agents command reference
  4. Strands Agents configuration reference
  5. Strands Agents progressive disclosure
  6. Strands Agents mount guide
  7. Strands Agents managed workspace
YOU'RE THROUGH THIS ONE.

Keep connecting the dots.

Back to the library

Many assistants.
One place to remember.

Bring your AI sessions, context, and usage together with Automater.

Meet Automater