agent-bridge
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Tools of the connected React Native app. Each takes args, an array of the tool's arguments. Results over 32 KB come back as a summary unless full is true. Until an app connects the list shows only the built-in tools (screen, app, bridge, and scenario, which only exists when the app defines scenarios); calls fail until then, and the app's own tools (query, store, net, ...) appear once it connects. If calls fail, call agent_bridge_status.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| app_reloadA | Reload the app's JS (Expo's reloadAppAsync, else DevSettings.reload). Pending restores (store, query, mocks, pins, storage) are lost, and the reply names them: restore first. Returns before it reloads; a session waits for the new bridge and reports what was lost. |
| app_restoreA | Undo what the app's own tools changed: runs the undos they registered with onRestore, newest first, once. Returns how many ran. |
| bridge_logsB | Errors and warnings the app logged, newest last. Options: {level: "error"|"warn"|"all", limit, clear}. |
| bridge_pendingA | What bridge.restore would undo right now, per area (store, query, net, app, ...): the value is true, or detail such as a store's snapshot against its current value. Empty when nothing is pending. Changes nothing. |
| bridge_restoreA | Undo what the agent changed: runs every *.restore tool in name order, scenario.restore last, and returns each result or error. |
| bridge_toolsC | Every tool this app exposes. |
| scenario_applyB | Apply a scenario: [name, options?]. Options must fit its schema (scenario.list). Returns what it returns. Applying an active one undoes it first. bridge.restore undoes it. |
| scenario_listC | Setups the app defines, e.g. a signed-in user: name, description, options (a JSON Schema), active. |
| scenario_restoreA | Undo every active scenario, newest first. bridge.restore runs this after every other restorer. |
| screen_captureA | Screenshot the app as a PNG. Returns {path} of a file on the device. |
| screen_fillA | Type into an input, then wait for the render. target is a string (testID, label, placeholder or text) or an object that must match every key it sets: {testID, label, placeholder, text, at:[x,y], index}. Unknown keys are errors. {at:[x,y]} hits the smallest element covering that point, for icon-only buttons with no label. Several matches: add an index, either in the target or as a trailing {index:n} argument. {submit:true} also submits. "" clears it. {type:true} types one character at a time, waiting for a render after each (for debounced or per-character inputs; "\n" is the Enter key). An input with no value prop gets its native text set; if that cannot be done the reply has a warning. |
| screen_findTextA | Find text on screen (substring, or exact with {exact:true}) and whether each match is on screen. Searches the same joined text screen.snapshot shows (nested Text concatenated) and accessibility labels; {labels:false} searches text only. Each match says which field matched; a miss lists near misses. Ignores screens the user can't reach (unfocused tabs and stack screens, under a modal); |
| screen_pressA | Press a button, then wait for the render. target is a string (testID, label, placeholder or text) or an object that must match every key it sets: {testID, label, placeholder, text, at:[x,y], index}. Unknown keys are errors. {at:[x,y]} hits the smallest element covering that point, for icon-only buttons with no label. Several matches: add an index, either in the target or as a trailing {index:n} argument. Text with no handler of its own presses the nearest ancestor that has one, and the reply says via:"ancestor". Disabled elements are refused; {force:true} presses anyway, to see what the app does on tap. {scroll:true} scrolls an off-screen target into view first. With no onPress it sends the "activate" accessibility action, as a screen reader's double tap does (swipe-to-confirm buttons, sliders), and the reply says via:"accessibilityAction:activate". {action:"increment"} (or any name in the element's snapshot |
| screen_refreshA | Pull to refresh: call the onRefresh of the RefreshControl of the scrollable holding a target (or the largest one with a RefreshControl on screen), then wait for the render. It does not wait for the data: follow with screen.waitFor. |
| screen_scrollA | Scroll the nearest ScrollView/FlatList/FlashList, then wait for the render. Takes a target (or {to: target}) to bring into the middle of its scrollable, {toEnd:true}, {toStart:true}, or {by: points} (negative scrolls back); the last argument may be {within: target, index} to name the scrollable (a target inside it, or its testID). Without a target it scrolls the largest scrollable on screen. Only rendered elements can be targeted: rows a FlatList has not rendered yet need {toEnd:true} or {by} first. Returns the offset and, for a target, whether it is now on screen. target is a string (testID, label, placeholder or text) or an object that must match every key it sets: {testID, label, placeholder, text, at:[x,y], index}. Unknown keys are errors. {at:[x,y]} hits the smallest element covering that point, for icon-only buttons with no label. Several matches: add an index, either in the target or as a trailing {index:n} argument. |
| screen_setValueA | Set a Switch, Slider, Picker or SegmentedControl: calls its onValueChange (and a Slider's onSlidingComplete) with the value, waits for the render and reads the value back. A Switch takes true or false, a Slider a number within minimumValue and maximumValue (0 and 1 by default) and on its step (onSlidingStart, onValueChange, onSlidingComplete), a Picker one of its Picker.Item values, a SegmentedControl one of its values (a wrong type or value is an error that lists the options). The reply has |
| screen_snapshotA | Buttons, inputs, text, and testID or labelled views on screen, with rects and checked/selected/expanded state (a Switch's value is checked). |
| screen_waitForA | Wait until a target is on screen, or gone with {gone:true}. Matches testID, label, placeholder, then the same joined text screen.snapshot shows. {scroll:true} also accepts a match rendered off screen and scrolls it into view, (it does not page lists for rows they have not rendered: wait for the list, then press/fill/setValue with {scroll:true}; not with gone). Default timeout 5000 ms; a timeout lists near misses. |
| agent_bridge_statusA | Whether this server is connected to the app, which app and session, how many tools it has, and why the last connect failed. Works with no app connected. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 19 tools
The screen_* tools are clearly separated by action (press, fill, setValue, scroll, refresh, findText, snapshot, waitFor, capture), and the scenario_* and bridge_* groups mostly target distinct operations. The main ambiguity is the restore trio — app_restore, bridge_restore, and scenario_restore — plus bridge_pending, which require careful reading to choose correctly.
There are clear domain prefixes (screen_, bridge_, scenario_, app_), which makes the set broadly readable. However, suffixes mix snake_case and camelCase (screen_findText, screen_setValue, screen_waitFor vs. screen_press, screen_snapshot), and agent_bridge_status breaks the bridge_ prefix pattern.
At 19 tools, the set is slightly heavy but reasonable for a full app bridge covering diagnostics, scenarios, restoration, and screen automation. Each tool has a recognizable role, though the three restore variants add some surface area that could be consolidated.
The surface covers screen inspection, interaction, waiting, scrolling, capture, scenario lifecycle, bridge diagnostics, logs, reload, and restoration. Minor gaps remain: no gesture/swipe tool for gesture-handler cases, no direct network/mock inspection despite mentions of net and mocks, and no app launch/terminate operation.