feedthrough
v0.4.0Debug bridge inside your web app: an agent reads the DOM, console and network.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_instructions
Returns the Feedthrough usage guide as a Markdown text document, with sections for the recommended workflow, tool-ordering tips, and selector advice. Read-only and takes no arguments; it does not touch the page or require a connected browser. Call it at the start of a debugging session if you are unfamiliar with Feedthrough or want a quick refresher.
connection_status
Check whether a browser with the Feedthrough bridge is currently connected. Returns a connected flag, a list of open tabs (id, url, which is active), and a 'server' block identifying this bridge: its name, version, and the port it actually bound. That port matters — if another agent session's server already held the default 8765, this one moved up, and the page will not find it until the app's dev server is started with FEEDTHROUGH_PORT set to the reported port. When a page is connected but behaving as though someone else is driving it, compare this name with the 'server' field from get_page…
get_console_logs
Return console output captured since the bridge connected. Covers every console method — log/warn/error/info/debug plus dir, table, assert, trace, count, countReset, time/timeEnd/timeLog, group/groupCollapsed/groupEnd, and clear. Each entry has a 'level' (the closest of the five standard levels); rich methods also carry a 'method' field, and console.trace() plus failing console.assert() entries include a 'stack'. Uncaught exceptions and unhandled promise rejections are also captured (level 'error', method 'uncaught' / 'unhandledrejection') even though the app never logged them. When the app…
| Parameter | Type | Description |
|---|---|---|
levels | array | Restrict to these levels, e.g. ['error'] to skip noisy warn/info/debug, or ['error', 'warn'] for both. Omit for all levels. |
limit | integer | Cap the result to the N most-recent entries, e.g. 50. Omit to return everything captured since the bridge connected. |
match | string | Case-insensitive substring filter on the serialized message content |
since | number | Only entries with ts >= this (ms epoch). Scope to 'what happened after I did X'. |
get_network_requests
Return all fetch and XHR requests captured since the bridge connected, including URL, method, HTTP status, duration, request and response headers, and request and response bodies (bodies capped at 10 KB each — anything longer is truncated with a marker; binary responses are summarised). Use this to find failed requests (4xx/5xx), wrong URLs, slow calls, or to inspect what the app actually sent or received. Use 'filter' to narrow by URL/method and 'since' (a ms timestamp) to see only requests that fired after an action. Read-only: it returns a passively captured log and does not issue or modi…
| Parameter | Type | Description |
|---|---|---|
filter | string | Filter by URL substring or HTTP method, e.g. 'api' or 'POST' |
since | number | Only requests with ts >= this (ms epoch). Scope to 'what fired after I did X'. |
query_dom
Query the page with a CSS selector and return a summary of every matching element (tag, id, classes, text content). Good for counting list items, checking what's rendered, or finding the right selector before calling inspect_element or click. Read-only: it only reads the DOM and never changes the page. Returns an empty list (not an error) when nothing matches, so it is also a safe existence check.
| Parameter | Type | Description |
|---|---|---|
selector * | string | A CSS selector matched against the whole document, e.g. '.todo-item', '#search-input', or 'nav a'. Returns every match, so it also works as a count or existence check. |
inspect_element
Return full details about a single element: tag, id, classes, all attributes, text content, bounding rect (top/right/bottom/left/width/height + page scroll and an inViewport flag), a compact ancestor 'path' (e.g. 'body > main > div#app > button.cta'), a curated set of computed styles (layout, box model, typography, positioning, flex/grid), an 'overflow' block when content is clipped/overflowing (scroll vs client size + per-axis x/y flags), a 'clipped' block when an ancestor's overflow cuts the element off (the clipping ancestor + which edges), an effective-visibility check ('visible' boolean,…
| Parameter | Type | Description |
|---|---|---|
selector * | string | A CSS selector that should resolve to one element, e.g. '#submit-btn' or 'main .card:first-child'. If several match, the first in document order is inspected. |
properties | array | Extra computed CSS properties to read by name (kebab-case), e.g. ['transform', 'z-index', 'margin-top']. They come back under a 'requested' object, in addition to the curated default set. |
click
Click an element by calling its native click(), which fires a click event and runs the default activation: following a link, toggling a checkbox or radio, submitting a form. Prefer an id selector (#submit-btn) for reliable targeting. Note it does NOT synthesize the preceding pointer/mouse sequence (pointerdown / mousedown / mouseup) or move focus, so a handler wired specifically to those events rather than to click won't fire; for keyboard-driven activation use press_key instead. Behavior: if the selector matches nothing the call returns an error; it does not scroll the element into view, and…
| Parameter | Type | Description |
|---|---|---|
selector * | string | A CSS selector for the element to click, e.g. '#submit-btn' or 'button[type=submit]'. If several match, the first in document order is clicked. |
fill
Set the value of an input, textarea, or select element. Focuses the element, assigns the value through the element's native value setter (so React/Vue controlled inputs register the change), then fires bubbling input and change events. The value is set in one shot, not typed character by character, so per-keystroke handlers (keydown / keypress / keyup / beforeinput) do NOT fire; to send Enter to submit or trigger a key shortcut, follow with press_key. Prefer an id selector (#search-input). If the selector matches nothing the call returns an error; it returns as soon as the events are dispatche…
| Parameter | Type | Description |
|---|---|---|
selector * | string | A CSS selector for the input, textarea, or select to fill, e.g. '#email' or 'input[name=q]'. |
value * | string | The full value to set. It replaces the field's current contents (it is not appended); for a <select>, pass the target option's value attribute. |
hover
Hover over an element by dispatching synthetic, bubbling mouseover and mouseenter events from inside the page. This triggers JavaScript hover handlers (onMouseEnter / onMouseOver), so hover-only UI that mounts on hover (tooltips, popovers, dropdown and submenus) appears in the DOM; follow up with query_dom, get_html, or inspect_element to read what was revealed. Three limits to know: it does NOT activate the CSS :hover pseudo-class (that is driven by the real cursor, not synthetic events), so styles or content shown purely via :hover in CSS will not change; no mouseout / mouseleave is sent, so…
| Parameter | Type | Description |
|---|---|---|
selector * | string | A CSS selector for the element to hover, e.g. '#menu-trigger' or '.tooltip-anchor'. Target the element that owns the hover handler (often the trigger, not the popup). |
press_key
Dispatch a key press (keydown/keypress/keyup) on an element — e.g. Enter to submit a search, Escape to close a modal, Tab to move focus, or ArrowUp/ArrowDown in a list. Use named keys (Enter, Escape, Tab, Backspace, Delete, ArrowUp/Down/Left/Right) or a single character. Note: this fires key handlers but does NOT insert text into inputs — use 'fill' to set an input's value, then press_key for the submit/shortcut. If the selector matches nothing the call returns an error; it dispatches the key events and returns without waiting for any resulting navigation or re-render.
| Parameter | Type | Description |
|---|---|---|
key * | string | A named key or a single character. Named keys: Enter, Escape, Tab, Backspace, Delete, ArrowUp, ArrowDown, ArrowLeft, ArrowRight (case-sensitive, as in the DOM KeyboardEvent 'key' value). Any other sin… |
selector * | string | A CSS selector for the element that receives the key, e.g. '#search-input'. Target a focused or focusable element: Enter on a focused input submits its form, Escape on an open dialog closes it, Tab mo… |
get_html
Return the outerHTML of an element (capped at 50 KB). Use this when the summarised query_dom output isn't enough and you need to see the actual markup/structure of a region. Read-only: it only reads the DOM and makes no changes, and it returns an error if the selector matches nothing.
| Parameter | Type | Description |
|---|---|---|
selector * | string | A CSS selector for the region to dump, e.g. '#app' or '.modal'. If several match, the first in document order is used. Scope it tightly: the outerHTML is capped at 50 KB. |
get_page_info
Return basic page context: current URL, document title, readyState, viewport size, scroll position, user agent, and a 'server' block naming which Feedthrough bridge this page is connected to (name, port, version — null against a pre-0.4 bridge). Read-only and non-destructive: it only reads page state and makes no changes. Useful to orient at the start of a session or confirm a navigation happened. If several agent sessions are running on this machine, check 'server.name' against connection_status: a mismatch means this tab is talking to another session's server, so you are driving the wrong…
set_style
Set one or more inline CSS properties on an element to PREVIEW a visual change live (e.g. shrink a label that doesn't fit, adjust padding or width). This edits the running DOM only — it is NOT saved to source and resets on reload — so tell the user it's a preview, and once they're happy, make the real change in the CSS/component source. Inline styles override the stylesheet and usually survive re-renders. The result includes a 'note' to relay; reset with reset_overrides.
| Parameter | Type | Description |
|---|---|---|
properties * | object | A map of CSS property to value, applied as inline styles. Property names are kebab-case and values are full CSS strings, e.g. { 'font-size': '13px', 'white-space': 'nowrap' }. Pass an empty string as… |
selector * | string | A CSS selector for the element to restyle, e.g. '#banner' or '.cta'. If several match, the first in document order is used. |
set_attribute
Set or remove an attribute on an element to preview a change (toggle disabled, swap a class, set an aria-* attribute). Pass value=null to remove the attribute. Live preview only — not saved to source, resets on reload. If the attribute is one a framework controls (class, value, checked, disabled, …) the result includes a 'frameworkWarning' that it may be reverted on the next render — relay it. Reset with reset_overrides.
| Parameter | Type | Description |
|---|---|---|
name * | string | The attribute name to set or remove, e.g. 'disabled', 'class', 'aria-expanded', 'hidden', or a 'data-*' attribute. |
selector * | string | A CSS selector for the target element, e.g. '#menu' or 'button.cta'. If several match, the first in document order is used. |
value * | string | null | The new value as a string, or null to remove the attribute entirely. For boolean attributes like 'disabled' or 'hidden', any non-null string (even '') sets them; use null to unset. |
set_text
Replace an element's text content to preview wording/label changes. Live preview only — not saved to source, resets on reload. textContent is almost always framework-controlled, so the result includes a 'frameworkWarning' that React/Vue/etc. will likely overwrite it on the next render — relay that, and persist real changes in the source. Reset with reset_overrides.
| Parameter | Type | Description |
|---|---|---|
selector * | string | A CSS selector for the element to relabel, e.g. '#title' or '.cta-label'. If several match, the first in document order is used. |
text * | string | The replacement text, inserted as plain text (not parsed as HTML). Replaces all existing child content of the element. |
reset_overrides
Undo every set_style / set_attribute / set_text change the bridge has applied since it connected, restoring the original values. Best effort: elements the framework has since re-created may not roll back (a page reload always fully resets).