Skip to content

Tools Reference ​

Jump to: Console · Network · Errors · Evaluate · Device · Environment · Redux · Components · Storage · Bundle · Simulator · Filesystem · Deep Link · Permissions · UI Interact · Navigation · Accessibility · Profiler · Test Recorder · Commands · Resources · Prompts

Console ​

  • get_console_logs — Get recent console output. Filter by level (log/warn/error/info/debug), search text, limit. Use since (Unix ms timestamp) to fetch only new entries. Supports summary mode. Output format: HH:MM:SS.mmm [level] message.
  • clear_console_logs — Clear the log buffer.

Network ​

Request Tracking ​

  • get_network_requests — Get buffered HTTP requests with method, URL, status, timing. Use since (Unix ms timestamp) to fetch only new entries. Supports device param for per-device filtering. Output format: HH:MM:SS.mmm METHOD URL → STATUS (duration, size).
  • get_request_details — Get full headers for a specific request by URL.
  • get_response_body — Get response body for a network request (cached if small; requires active session if large).
  • search_network — Filter by URL pattern, method, status code, or errors only. Use limit to cap results (default 20).
  • get_network_stats — Aggregated network statistics: breakdown by domain, status code distribution, response time percentiles (p50/p95/p99), and slowest endpoints.
  • clear_network_requests — Clear the network request buffer.

Errors ​

  • get_errors — Get uncaught exceptions with symbolicated stack traces. Use since (Unix ms timestamp) to fetch only new entries. Output format: HH:MM:SS.mmm Message\nStack.
  • clear_errors — Clear the error buffer.

Evaluate ​

  • evaluate_js — Execute any JavaScript expression in the running app and return the result. Supports async/await.

Device ​

  • list_devices — List connected debuggable targets from Metro.
  • get_app_info — Bundle URL, platform, device name, VM type.
  • get_connection_status — CDP connection state and Metro status.
  • reload_app — Request Page.reload and verify that a unique runtime marker disappears on the same app. Returns separate dispatch and verification status; a submitted command alone does not mean the app restarted. If CDP explicitly lacks reload support, the Metro message fallback is directed only to a peer whose app and device identity match. Ambiguous responses never trigger a second reload. timeout defaults to 15000ms (maximum 60000ms).

Environment ​

  • get_build_info — Return build-time and runtime flags: __DEV__, platform, OS version, React Native version, Hermes engine status, New Architecture flag, and expo-application fields (bundleId, appVersion, buildNumber) when available.
  • get_env_vars — Return a filtered subset of process.env from the running app. Credential-like keys (SECRET, KEY, TOKEN, PASSWORD, etc.) are redacted by default. Params: filter (key name substring), includeAll (include redacted keys).
  • get_platform_constants — Return the full Platform.constants object from React Native, including OS-specific build details and reactNativeVersion.
  • get_expo_config — Return expo-constants manifest / expoConfig fields if the app uses Expo, otherwise null. Skips internal fields (plugins, hooks, _internal, etc.).

Source ​

  • symbolicate — Convert minified stack traces to original source locations.

Redux ​

No app changes needed for basic state inspection.

  • get_redux_state — Get the full state tree or a specific slice via dot-path (e.g., user.profile).
  • dispatch_redux_action — Dispatch an action to the Redux store.
  • get_redux_actions — Get recent dispatched actions (real-time with client SDK).

Components ​

No app changes needed.

  • get_component_tree — Get a paged flat React component snapshot. Follow nextCursor to retrieve all nodes, then reconstruct hierarchy from id and parentId.
  • find_components — Search by component name pattern inside the app runtime.
  • inspect_component — Get detailed props, state, and hooks for a specific component.
  • get_testable_elements — List all elements with testID or accessibilityLabel.

All component read tools return traversal metadata. Check complete before interpreting an empty result as “not found”; depthReached, scannedNodes, and truncationReason explain bounded results. Traversal defaults to maxDepth=200 and maxNodes=1200, supports depths up to 600, and reports whether it inspected the focused-scene or all-scenes.

Projected props share a 256 KiB UTF-8 JSON budget across each runtime capture, including all pages of a component-tree snapshot. Once it is exhausted, later props are omitted and truncationReason is max-prop-bytes (unless a traversal limit was already reached). Use structureOnly=true when only hierarchy and selectors are needed.

Storage ​

No app changes needed.

  • get_storage_keys — List all AsyncStorage keys.
  • get_storage_item — Read a specific key value.
  • get_all_storage — Dump all key-value pairs.

Bundle ​

  • get_bundle_status — Metro server status and health check.
  • get_bundle_errors — Compilation/transform errors with file paths.

Simulator ​

  • take_screenshot — Capture a simulator/device screenshot. Returns a retained temporary PNG path by default; set delivery to inline for a native MCP image block. Captures larger than 64 MiB are rejected and removed.
  • list_simulators — List iOS simulators and Android emulators.
  • install_certificate — Add root certificate to device.
  • get_native_logs — Native logs (iOS syslog / Android logcat).
  • app_lifecycle — Launch, terminate, install, uninstall apps.
  • get_screen_orientation — Get current orientation.

Filesystem ​

Browse and read files inside the app's private sandbox. Useful for inspecting SQLite databases, MMKV stores, exported files, and cached data — without needing a rooted device or custom app code.

  • get_app_directories — Return absolute paths for the app's known directories: root, documents, library, cache, temp. iOS requires bundleId; Android falls back to evalInApp via expo-file-system / react-native-fs if bundleId is omitted.
  • list_directory — List files and subdirectories at a path. Returns compact text — one entry per line with type (d/f), size, modified date, and name; directories have a trailing /. Pass recursive: true for a full tree (raw text). Call get_app_directories first to get the root path.
  • read_file — Read file contents with a configurable byte cap (default 50 KB, hard cap 1 MB). Returns the file content as a plain string, or { content, truncated: true } when the cap was reached. Use encoding: 'base64' for binary files (SQLite, images, MMKV). Params: path, bundleId (Android), encoding, maxBytes.
  • get_file_info — Get metadata for a single file or directory. Returns a compact single-line string: type (d/f), size, modified date, and name.
  • delete_file (destructive) — Delete a file. Requires confirm: true to prevent accidental deletion.

Platform notes

  • iOS Simulator: uses xcrun simctl get_app_container to resolve the sandbox root, then ls/head on the host.
  • Android: uses adb shell run-as <packageName> for app-private directories; public storage paths can be read without bundleId.
  • open_deeplink — Open a URL or deep link on the device.
  • list_url_schemes — List registered URL schemes. On iOS this reads CFBundleURLTypes from the selected installed app's Info.plist using its concrete simulator UDID. Provide bundleId to inspect a specific app, or omit it to use the connected Metro target's app ID. Android uses the package manager dump on the selected device serial for compatibility. platform accepts ios, android, or the default auto; selecting an explicit platform requires bundleId so an app ID from a connected target on another platform is never reused.

Permissions ​

Inspect and manage app permissions on iOS Simulator and Android Emulator without leaving your workflow. Uses xcrun simctl privacy on iOS and adb shell pm on Android. Bundle ID / package name is auto-detected from config or the running app, or can be supplied explicitly.

iOS services (supported by xcrun simctl privacy): calendar, contacts, contacts-limited, location, location-always, media-library, microphone, motion, photos, photos-add, reminders, siri

Android permissions: Runtime (dangerous) permissions only — the app must have declared the permission in its AndroidManifest.xml. Provide just the suffix (e.g. CAMERA) or the full string (e.g. android.permission.CAMERA). Install-time permissions (e.g. INTERNET) cannot be granted this way.

  • list_permissions — List all permission statuses for the app. Returns compact text: one name=status line per permission.
  • grant_permission — Grant a permission to the app.
  • revoke_permission — Revoke a permission from the app.
  • reset_permissions — Reset one or all permissions to their default state. On iOS, omit service to reset everything. On Android, omit service to reset all runtime permissions (falls back to pm clear on older devices).
  • open_app_settings — Open the connected app's system settings page via React Native Linking.openSettings() and await completion. An optional bundle ID must match the connected app. Reports unsupported capability when the app does not expose Linking through Metro.

UI Interact ​

UI actions try the connected app's React handlers first. Coordinate actions then use the installed SimView MCP provider on iOS, followed by supported IDB commands; Android actions use the selected ADB serial. Native results include the backend and whether dispatch was submitted, refused, or uncertain. Providers are optional and are detected with read-only probes.

  • list_elements — Get interactive elements from the React component tree (labels, testIDs, roles) with traversal completeness metadata. No IDB needed.
  • tap_element — Tap by label/testID through the React fiber tree, or send logical device-point coordinates directly through SimView/IDB on iOS or the selected ADB serial on Android.
  • type_text — Type into a TextInput by testID/label or the first visible input (bounded Fiber handler → SimView → IDB on iOS, or the selected ADB serial on Android). Native results include the provider and dispatch status.
  • long_press — Long press through a React handler by label/testID, or send logical device-point coordinates through the native provider.
  • swipe — Scroll through a React handler, or derive a directional native swipe from the current device geometry.
  • press_button — Invoke React text-input handlers for ENTER/DELETE before using a supported native button capability.

No app changes needed.

  • get_navigation_state — Full React Navigation / Expo Router state.
  • get_current_route — Currently focused route name and params.
  • wait_for_navigation — Wait for a focused route by name (up to the supplied timeout). Uses the same SDK, navigation ref, Expo state, and bounded Fiber discovery as get_current_route, including nested navigators. It also succeeds when the requested route is already focused.
  • get_route_history — Navigation back stack.
  • list_routes — Sorted, deduplicated registered and mounted route names from all available navigation state, including unvisited screens in routeNames. Nested navigators that have not initialized their state cannot be discovered.

Accessibility ​

No app changes needed.

  • audit_accessibility — Audit the current screen for missing labels, roles, testIDs, and alt text. Always returns { issues, summary, traversal }, including clean results. maxDepth defaults to 200 (maximum 600); maxNodes defaults to 1200 (maximum 5000). Check traversal.complete before treating an empty issue list as a clean audit. Incomplete results report their truncation reason; increase the limits to inspect deeper or wider trees. Severity filters affect issues, while the summary counts all findings in the inspected portion.
  • check_element_accessibility — Deep check on a specific component.
  • get_accessibility_summary — Counts overview of accessibility coverage.

Commands ​

  • list_commands — List custom commands registered by the app.
  • run_command — Execute a custom command with parameters.

Profiler ​

See the profiling guide for a full explanation of CDP CPU profiling vs React <Profiler>.

  • start_profiling — Start Hermes CPU profiling via CDP. Param: samplingInterval in µs (default 1000). Captures all JS execution — React, Redux, navigation, your code.
  • stop_profiling — Stop profiling and return top functions ranked by self time and total time. Params: topN (default 20), includeNative (default false).
  • get_profile_status — Check whether profiling is active and whether a previous profile is available.
  • get_flamegraph — Return the current profiling results as a human-readable text flamegraph: CPU call tree + ranked chart + React render chart.
  • get_react_renders — Read render timings from <Profiler onRender={trackRender}> components. Returns renders sorted by actualDuration with memoSavingsPercent. Requires trackRender from metro-bridge/client. Param: clear (bool).

Profiler Resources ​

URIDescription
metro://profiler/flamegraphCPU call tree with time bars + ranked self-time chart + React render chart (text)
metro://profiler/dataRaw JSON: full CDP Profile object + React render records with memo savings

Test Recorder ​

Records real user interactions via React fiber patching — no app code changes required. See the testing guide for full details.

  • start_test_recording — Install interaction interceptors, refresh mounted props, and wait for complete bounded React fiber coverage before enabling capture. Captures taps, text entry, long presses, keyboard submits, and scroll/swipe gestures. Re-patches new fibers after each navigation so newly-loaded screens are always covered; startup fails and cleans up when the bounded scan cannot confirm coverage.
  • stop_test_recording — Stop recording and retrieve the captured event log. Deduplicates rapid-fire text input events (keeps the final value per field).
  • generate_test_from_recording — Convert the recording to a test file. Params: format (appium/maestro/detox), testName, platform (ios/android/both), bundleId, includeSetup. Appium output is a Mocha-compatible WDIO spec that uses the runner-owned browser session.
  • generate_wdio_config — Generate a minimal wdio.conf.ts for Appium + React Native, including the install command for all required packages. Optional udid, deviceName, and platformVersion values select a device without embedding fixed simulator defaults. For platform: both, use iosBundleId or iosAppPath and androidPackageName or androidAppPath, together with the matching per-platform device options. noReset defaults to true to preserve the installed app and its data during replay.

Chrome DevTools ​

  • open_devtools — Open the React Native DevTools debugger panel in Chrome (or Edge). Uses Metro's bundled rn_fusebox frontend but routes the WebSocket through the MCP's CDP proxy so both DevTools and the MCP can coexist. Finds Chrome/Edge automatically via chrome-launcher. See Chrome DevTools in the README for why you should use this instead of pressing "j" or tapping "Open Debugger".

Debug Globals ​

No app changes needed.

  • list_debug_globals — Auto-discover well-known global debugging objects in the app runtime: Redux stores, Apollo Client, Expo Router state, React DevTools hook, and more. Use detailed=true to include top-level keys for each discovered global.

Inspect Point (Experimental) ​

No app changes needed.

  • inspect_at_point — Inspect the React component rendered at specific screen coordinates. Walks the React fiber tree to find the host component whose layout contains the given (x, y) point, then walks up to find the nearest named React component. Returns component name, host element type, layout bounds, and optionally props. Layout measurement varies between Old and New Architecture.

Token-Efficient Output ​

Console, network, and error tools always output compact single-line text with short timestamps (HH:MM:SS.mmm) rather than JSON objects. All JSON responses are minified.

Additional modifiers to reduce context window usage:

ModifierApplies ToEffect
since: numberConsole, Network, ErrorsOnly return entries after this Unix timestamp (ms) — pass the last seen entry's timestamp to avoid re-fetching already-seen data
summary: trueConsole, Network, ErrorsOne-line summary with counts instead of full output
structureOnly: trueComponentsComponent tree without props/state (~1-3KB)
compact: trueComponents, Navigation, ReduxSingle-line compressed format
limit: numberMost toolsCap number of results

Resources ​

URIDescription
metro://logsLive console log stream (plain text, compact format)
metro://networkLive network request stream (plain text, compact format)
metro://errorsLive error stream (plain text, compact format)
metro://statusConnection status
metro://redux/stateRedux state snapshot
metro://navigationNavigation state
metro://bundle/statusMetro bundle status
metro://profiler/flamegraphCPU flamegraph + React render chart (text)
metro://profiler/dataRaw JSON profiling data for agent analysis

Prompts ​

NameDescription
debug-appGeneral debugging session
debug-errorsError investigation workflow
debug-performancePerformance analysis
diagnose-networkNetwork issue diagnosis
trace-actionTrace user action through state + network
record-testRecord a user flow and generate an Appium, Maestro, or Detox test
audit-accessibilityAccessibility audit with fixes

Released under the MIT License.