Skip to content

Tools

All tools return a short text summary plus structuredContent matching the output schema. Failures come back as structured errors — see error codes. Tool availability depends on your host (e.g. iOS tools require macOS); run doctor to see what’s registered.

Check the health of the React Native development environment: detected OS, iOS/Android toolchains, Metro status and project info. Call this first when something is failing or before device/build operations.

read-only

Input:

FieldTypeRequiredDescription
projectRootstringnoProject root to inspect (default: server —project-root)

Output (structuredContent):

FieldTypeRequiredDescription
hostobjectyes
iosobjectyes
androidobjectyes
metroobjectyes
projectobjectyes
problemsarray<object>yes
restartRequiredbooleanyes
Contract: spec 001

List iOS simulators and Android emulators/devices in a unified format. By default shows booted devices plus the newest-OS variant per device family; pass filter “all” for everything.

read-only

Input:

FieldTypeRequiredDescription
platformios | androidnoOnly list one platform
statebooted | shutdownnoOnly list devices in this state
filterdefault | allno”all” disables the newest-OS-per-family collapsing

Output (structuredContent):

FieldTypeRequiredDescription
devicesarray<object>yes
totalCountnumberyes
shownnumberyes
Contract: spec 011

Boot a simulator/emulator by id and wait until it is usable. No-op if already booted. For cold Android AVDs use the avd:<name> id from list_devices.

idempotent

Input:

FieldTypeRequiredDescription
deviceIdstringyesDevice id from list_devices (simctl UDID, adb serial, or avd:<name>)
timeoutSecondsintegernoMax seconds to wait for boot (default 120)

Output (structuredContent):

FieldTypeRequiredDescription
deviceobjectyes
Contract: spec 011

Shut down a running simulator/emulator.

idempotent

Input:

FieldTypeRequiredDescription
deviceIdstringyesDevice id from list_devices (simctl UDID, adb serial, or avd:<name>)

Output (structuredContent):

FieldTypeRequiredDescription
deviceIdstringyes
stateshutdownyes
Contract: spec 011

Install a built app artifact on a booted device: a .app bundle (iOS simulator) or .apk (Android). Returns the app id for launch_app.

Input:

FieldTypeRequiredDescription
deviceIdstringyesDevice id from list_devices (simctl UDID, adb serial, or avd:<name>)
appPathstringyesPath to the .app bundle (iOS) or .apk (Android)

Output (structuredContent):

FieldTypeRequiredDescription
appIdstringyesBundle id / package name (may be empty if undetectable)
Contract: spec 012

Uninstall an app from a device. Destructive: removes the app and its data.

destructive

Input:

FieldTypeRequiredDescription
deviceIdstringyesDevice id from list_devices (simctl UDID, adb serial, or avd:<name>)
appIdstringyesBundle id (iOS) or package name (Android)

Output (structuredContent):

FieldTypeRequiredDescription
appIdstringyes
removedbooleanyes
Contract: spec 012

Launch an installed app on a booted device by bundle id / package name.

Input:

FieldTypeRequiredDescription
deviceIdstringyesDevice id from list_devices (simctl UDID, adb serial, or avd:<name>)
appIdstringyesBundle id (iOS) or package name (Android)

Output (structuredContent):

FieldTypeRequiredDescription
pidnumbernoProcess id (iOS only)
Contract: spec 012

Stop a running app. Succeeds (terminated: false) if the app was not running.

idempotent

Input:

FieldTypeRequiredDescription
deviceIdstringyesDevice id from list_devices (simctl UDID, adb serial, or avd:<name>)
appIdstringyesBundle id (iOS) or package name (Android)

Output (structuredContent):

FieldTypeRequiredDescription
terminatedbooleanyes
Contract: spec 012

Open a URL on the device: custom schemes (myapp://…), universal links, or exp:// links. The primary way to drive app navigation from outside the app.

Input:

FieldTypeRequiredDescription
deviceIdstringyesDevice id from list_devices (simctl UDID, adb serial, or avd:<name>)
urlstringyesThe URL or deep link to open

Output (structuredContent):

FieldTypeRequiredDescription
openedbooleanyes
Contract: spec 012

Capture a screenshot of a booted device. Returns the PNG path and (by default) the image itself for visual verification.

read-only

Input:

FieldTypeRequiredDescription
deviceIdstringyesDevice id from list_devices (simctl UDID, adb serial, or avd:<name>)
returnImagebooleannoInclude the image in the response (default true)

Output (structuredContent):

FieldTypeRequiredDescription
pathstringyes
formatpngyes
Contract: spec 013

Set a clean, deterministic status bar (9:41, full battery, full signal) for stable screenshots — or restore the real one with enabled: false.

idempotent

Input:

FieldTypeRequiredDescription
deviceIdstringyesDevice id from list_devices (simctl UDID, adb serial, or avd:<name>)
enabledbooleanyestrue = demo mode, false = restore real status bar
timestringnoClock to display (default “9:41”)

Output (structuredContent):

FieldTypeRequiredDescription
appliedbooleanyes
Contract: spec 013

List debuggable React Native runtimes exposed by Metro. Call when a runtime tool reports TARGET_AMBIGUOUS or to check what is connectable. Requires Metro running.

read-only

Input:

FieldTypeRequiredDescription
portintegernoMetro port (default: server —metro-port)

Output (structuredContent):

FieldTypeRequiredDescription
targetsarray<object>yes
metroPortnumberyes
Contract: spec 020

Read console logs from the running React Native app (buffered since the runtime bridge connected). Cursor-based: pass the previous nextCursor to read only new entries. Requires Metro running.

read-only

Input:

FieldTypeRequiredDescription
cursorintegernoRead entries after this cursor (from a previous nextCursor)
limitintegernoMax entries to return (default 50)
leveldebug | info | warn | errornoMinimum severity
filterstringnoCase-insensitive regex applied to entry text
targetIdstringnoRuntime target id (from list_runtime_targets)

Output (structuredContent):

FieldTypeRequiredDescription
entriesarray<object>yes
nextCursornumberyes
droppednumberyesEntries lost to ring-buffer overflow since the cursor
bufferedSincenumberyes
Contract: spec 021

Execute a JavaScript expression inside the running React Native app and return the result. Use to inspect state (Redux/Zustand stores, globals) or trigger behavior. Promises are awaited via polling (Hermes limitation), up to timeoutMs. This can mutate app state — prefer read-only expressions when verifying. Requires Metro running.

Input:

FieldTypeRequiredDescription
expressionstringyesA JS expression (wrap multi-statement code in an IIFE)
awaitPromisebooleannoAwait a returned Promise via polling (default true)
timeoutMsintegernoPromise wait budget (default 5000)
targetIdstringnoRuntime target id (from list_runtime_targets)

Output (structuredContent):

FieldTypeRequiredDescription
resultTypestringyes
resultanyno
previewstringnoString preview when the value is not fully serializable
truncatedbooleanno
exceptionobjectno
Contract: spec 022

Trigger a full JS reload of the running React Native app (same as pressing ‘r’ in the Metro terminal). Requires Metro running.

idempotent

Input:

FieldTypeRequiredDescription
targetIdstringnoRuntime target id (from list_runtime_targets)

Output (structuredContent):

FieldTypeRequiredDescription
reloadedbooleanyes
Contract: spec 023

Start a native build (xcodebuild or Gradle) in the background and return a job id immediately. Poll with get_build_status. Use after native-layer changes; for pure JS changes prefer reload_app.

Input:

FieldTypeRequiredDescription
platformios | androidyesWhich native platform to build
projectRootstringnoProject root (default: server —project-root)
schemestringnoiOS scheme (default: auto-detected from the workspace)
variantstringnoAndroid variant (default “debug”)
cleanbooleannoClean before building

Output (structuredContent):

FieldTypeRequiredDescription
jobIdstringyes
statusrunningyes
logPathstringyes
commandstringyes
Contract: spec 030

Check a build job started by run_build. Long-polls up to waitSeconds (default 25) so you can wait efficiently; on completion returns structured diagnostics with probable causes and suggested fixes.

read-only

Input:

FieldTypeRequiredDescription
jobIdstringyes
waitSecondsintegernoLong-poll budget (default 25)

Output (structuredContent):

FieldTypeRequiredDescription
statusrunning | succeeded | failed | cancelledyes
elapsedMsnumberyes
exitCodenumberno
errorCountnumberno
warningCountnumberno
diagnosticsarray<object>no
artifactPathstringno
logPathstringyes
logSizeBytesnumberno
logTailstringnoLast lines of the log — only when no signature matched a failure
Contract: spec 030

Cancel a running build job (kills the whole process tree).

Input:

FieldTypeRequiredDescription
jobIdstringyes

Output (structuredContent):

FieldTypeRequiredDescription
statussucceeded | failed | cancelledyes
Contract: spec 030

Run CocoaPods install for the iOS project (uses bundler when a Gemfile exists). Call when a build fails with sandbox/Podfile.lock errors or after adding native dependencies.

Input:

FieldTypeRequiredDescription
projectRootstringnoProject root (default: server —project-root)

Output (structuredContent):

FieldTypeRequiredDescription
succeededbooleanyes
diagnosticsarray<object>no
Contract: spec 030

Parse a native build log (xcodebuild, Gradle, CocoaPods, Metro) into structured diagnostics with probable causes and suggested fixes. Use on logs from terminals, CI, or a logPath from get_build_status.

read-only

Input:

FieldTypeRequiredDescription
logPathstringnoPath to a log file on disk (max 20MB)
logTextstringnoRaw log text (max 256KB) — provide exactly one of logPath/logText

Output (structuredContent):

FieldTypeRequiredDescription
diagnosticsarray<object>yes
errorCountnumberyes
warningCountnumberyes
platformGuessios | android | cocoapods | metro | unknownyes
unmatchedTailstringno
Contract: spec 032