Trace query MCP server: let coding agents debug a failed run from its trace.zip
Maintainer thường phản hồi trong vòng 1 ngày
@vishnuv688 đang làm issue này rồi.
Từ ngày 29/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Problem
A trace.zip can only be read by opening it in the player (show-trace) or by reading its transcript.md. A coding agent given the transcript sees a list of steps but not the console, the network, the page or the source that ran, and loading the whole archive into its context costs far too many tokens. So an agent cannot debug a failed run from its trace.
Proposal
An MCP server, published as @wdio/devtools-trace-mcp, that lets an agent query a trace and fetch only what it needs: the failing action, the console and network activity around it, the page at that moment, and the source line.
It reads the trace file, not the adapter, so it covers all four adapters (WebdriverIO, Selenium, Nightwatch and Python) and foreign trace zips. The existing reader (parseTraceZip) already parses all of them; the server is a query layer with token budgeting on top of it.
Phase 1 tools
| Tool | Returns |
|---|---|
open_trace |
A handle and a summary: runner, browser or device, duration, counts of actions, console errors and failed requests, the first error, the test tree with pass/fail |
get_errors |
Failed actions, console errors and failed requests in one chronological list, each linked to its nearest action |
list_actions |
Paginated action rows, filterable by status, group and time window |
get_action |
Args, result, error with expected/actual, stack, surrounding source lines |
get_console |
Console and stdio lines, filterable by level, text and time around an action |
get_network / get_network_request |
Requests with status and timing; headers, and the body only when asked for |
get_page_snapshot |
The accessibility tree, with locators, at an action |
get_screenshot |
A downscaled screenshot at an action |
get_transcript |
The existing transcript.md |
All tools are read-only, paginated, and return large data (bodies, screenshots) only on request.
Phase 2
list_traces (which tests failed in a run), get_timeline (actions, console and network in one window), get_source, compare_traces (first divergence between a passing and a failing run, or two attempts), and configurable redaction patterns.
Later release
The same tools over HTTP on a running backend, so an agent can query a run before it finishes, followed by write tools such as rerunning a test behind explicit confirmation.
Adapter differences the server handles
- The Python adapter does not write the artifacts manifest, so per-test outcomes are read from the test tree inside each zip.
- Nightwatch's BDD
describe/itwrites one zip per module, keyed to the first test, so outcomes come from the action tree rather than the file name. - Nightwatch emits native asserts in a batch at test end, so actions are ordered by start time and issue order.
- Native app traces have no DOM; snapshots come from the page-source XML.
Safety
- Opens files only under an allowed root, resolved with
realpathso..and symlinks cannot escape. - Limits on zip size and total uncompressed size.
- A trace holds everything the run typed and displayed, and whatever the server returns is sent to the AI provider. The README will say so.
- Page text, console output and response bodies are returned as marked data, since they can carry prompt injection.
Decisions
- Separate package, not a backend subcommand, so the install stays small. Decided.
- Live runs: later release. Decided.
- Redaction in the MVP: open. Proposal: on by default, masking
Authorization/Cookie/Set-Cookieheaders, omitting bodies unless asked, and masking values typed into password fields wherever they appear, with--no-redactto turn it off.
Delivery
- Move
parseTraceZip/readTraceZipfrombackendinto the workspace-internaltracepackage, so the MCP package does not depend onbackend. No behaviour change. - New
trace-mcppackage with the phase 1 tools, path guard, size limits, fixture zips from every adapter, and an MCP contract test. - README and website docs, with setup for Claude Code and Cursor.
- Phase 2 tools.
- Live runs (later release).
Success measure
On a fixed set of real failing traces with known causes, an agent using the server names the right cause more often, and with fewer tokens, than an agent given transcript.md alone.
- Ngôn ngữ chính
- TypeScript
- Star
- 10
- Fork
- 4
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 76
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của webdriverio/devtools
-
Trace: fetch/XHR response bodies hidden in the player on Safari (content.mimeType is empty)Có thể đã có người làm @SergeyPirogov đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
webdriverio/devtools#586 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
webdriverio/devtools#585 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 44/100
webdriverio/devtools#584 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Python: capture the native element tree per action in trace modeCó thể đã có người làm @vishnuv688 đã nhận 15 ngày trước. Đang mở
webdriverio/devtools#570 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của webdriverio/devtools
Issue tương tự
-
Postgres upgrade golden leaves fixture URL query parameters in the expected output comparisonĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
garrytan/gbrain#10437 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bedrock "Too many tokens" throttle is not auto-retried, unlike "Too many requests"Có thể đã có người làm @acmerfight đã nhận hôm nay. Đang mởuntriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
earendil-works/pi#12573 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
agentes-chat/agentes-chat#1506 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
comp/desktop desktop/files os/windows P2 type/perf
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
NousResearch/hermes-agent#160359 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Missing repro Platform: Android
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
software-mansion/react-native-reanimated#11554 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày