Skip to content

Add get_telemetry_event action for uncompacted single-event reads#123

Closed
yummybomb wants to merge 1 commit into
hypeship/mcp-browser-telemetryfrom
hypeship/mcp-telemetry-event-raw
Closed

Add get_telemetry_event action for uncompacted single-event reads#123
yummybomb wants to merge 1 commit into
hypeship/mcp-browser-telemetryfrom
hypeship/mcp-telemetry-event-raw

Conversation

@yummybomb

Copy link
Copy Markdown
Contributor

Stacked on #119.

summary

  • add a get_telemetry_event action to manage_browsers: fetch one archived telemetry event by seq with its full payload, so fields that get_telemetry compacts away (headers, body, post_data, oversized fields) can be inspected when they are the evidence — e.g. a response body carrying an API error message. Screenshot png stays omitted: base64 image data is unusable in a text response and can run to hundreds of KB.
  • event seq values are embedded in record bodies by the instance, while the read endpoint's offset addresses the underlying stream position — the two run at a locally constant drift (observed off-by-one in production). The lookup probes near the target, measures the drift from the returned page, and re-anchors rather than assuming alignment; unresolvable seqs return a clear error pointing back at get_telemetry.
  • extract the shared response envelope from compactTelemetryEvent so the compact and raw paths format events identically.
  • point the debug-browser-session prompt at the new action for the omitted-field case.

live verification (production)

Exercised the handler end-to-end against production: recovered omitted headers on an archived network_request, fetched the first and last events of the archive, verified past-tail and before-archive seqs return clean errors, missing seq and unknown session ids produce proper tool errors, and confirmed reads work after the session is deleted.

No test suite in the repo; tsc --noEmit and prettier pass.

get_telemetry compacts events to fit an agent context window, which
strips exactly the fields sometimes needed as evidence (response bodies
carrying error messages, request headers, post data). Add a
manage_browsers action that fetches one archived event by seq with its
full payload; only screenshot png stays omitted.

Event seq values are embedded in record bodies by the instance while
the offset param addresses the stream position, so the lookup probes
near the target and corrects for the observed drift instead of assuming
the two are aligned.
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mcp Ready Ready Preview, Comment Jul 16, 2026 5:53pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant