Watch the page for a while
qa_watchStarts a short, self-expiring watch on a browser tab to capture DOM changes, network requests, console errors, announcements, and layout shifts as buffered events for later review.
Instructions
THE ONE QUESTION THE OTHER VERBS CANNOT ANSWER: what happens over the next few seconds. Everything else here answers about NOW — a toast that appears and leaves, a request fired by a timer, a row that arrives late, a value a websocket rewrites are all invisible to a snapshot taken before or after them. Polling costs a call per look and still misses the gaps between looks. op:"start" begins a watch and returns its id; op:"read" hands back what it has buffered since the last read; op:"list" shows what is running; op:"stop" ends one early ("all" ends every one). Four things can be watched: "mutations" (the DOM, optionally scoped with within), "network" (requests as they start and finish), "console" (console output, JS errors, rejections), "announcements" (aria-live regions — what a screen reader would have said). EVERY WATCH EXPIRES BY ITSELF — ttlMs is capped at two minutes and there is no "until stopped". That is deliberate: a watch left running is silent, and the readings taken after it are the ones that go wrong. It observes and never acts, so it needs no consent beyond the bridge itself.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "qa_watch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | For "read"/"stop": which watch (from "start"). "all" stops every watch. | |
| op | No | start · read · stop · list | start |
| name | No | A label for this watch, so a list of four is readable | |
| omit | No | Drop these field paths and keep the rest — the cheap way to lose one huge field (["html"], ["steps"]) without listing everything you want. | |
| what | No | For "start": what to watch — THE FIELD IS `what`, not `watch` or `kind` (a session lost two calls to that). Five kinds: mutations · network · console · announcements · shifts. "shifts" is the one nothing else can answer — the browser reports every layout jolt WITH THE NODES that moved and where they moved from, so «the page jumped» stops being a complaint and becomes a named element. The vocabulary is closed on purpose: a watch names what to observe, never a program to run. Missing a kind? Record it with qa_gap. | |
| drain | No | For "read": default true — events are handed over once. Pass false to peek without consuming, at the risk of counting the same event twice. | |
| limit | No | For "read": how many events to return (default 50) | |
| match | No | Keep only events whose text matches this (case-insensitive pattern) — the cheapest way to make a noisy page answerable | |
| tabId | No | Target tab (from qa_tabs); omit for the active tab | |
| ttlMs | No | How long to watch, 1s–120s (default 20s). It stops on its own at the end whatever else happens. | |
| select | No | Keep only these field paths, e.g. ["ok","fields[].name"]. Dots walk into objects, and a path through a list applies to every entry, keeping it a list. A path that matches nothing is reported back with the field names that ARE there. | |
| within | No | For "mutations": a CSS selector to watch inside, instead of the whole body — the difference between a readable answer and every repaint on the page |