{"at":"2026-11-22T23:58:33.876Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-22T23:58:34.649Z","dir":"received","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"metro-mcp","version":"0.15.0"}},"cacheScope":"private","capabilities":{"prompts":{"listChanged":true},"resources":{"listChanged":true,"subscribe":true},"tools":{"listChanged":true}},"instructions":"React Native runtime debugging MCP server. Connects to Metro bundler via Chrome DevTools Protocol to provide console logs, network requests, component tree inspection, state management debugging, device control, and more. Use list_devices to see connected targets, then use other tools to inspect and interact with the running app.","resultType":"complete","supportedVersions":["2026-07-28"],"ttlMs":0}}}
{"at":"2026-11-22T23:58:34.649Z","dir":"sent","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-22T23:58:34.663Z","dir":"received","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"metro-mcp","version":"0.15.0"}},"cacheScope":"private","resultType":"complete","tools":[{"_meta":{"ui":{"resourceUri":"ui://metro/console"},"ui/resourceUri":"ui://metro/console"},"annotations":{"readOnlyHint":true},"description":"Get recent console output. Filter by level or search text.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\" for aggregated logs. Defaults to current device.","type":"string"},"format":{"default":"text","description":"Return 'json' for a structured array of log entries","enum":["text","json"],"type":"string"},"level":{"description":"Filter by log level","enum":["log","warn","error","info","debug"],"type":"string"},"limit":{"default":50,"description":"Maximum number of logs to return","type":"number"},"search":{"description":"Search text to filter logs","type":"string"},"since":{"description":"Only return entries after this Unix timestamp (ms). Pass the timestamp of the last seen entry to fetch only new ones.","type":"number"},"summary":{"default":false,"description":"Return a one-line summary with counts","type":"boolean"}},"type":"object"},"name":"get_console_logs"},{"annotations":{"destructiveHint":true,"idempotentHint":true},"description":"Clear the console log buffer.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key to clear, or omit for current device. Use \"all\" to clear all.","type":"string"}},"type":"object"},"name":"clear_console_logs"},{"_meta":{"ui":{"resourceUri":"ui://metro/network"},"ui/resourceUri":"ui://metro/network"},"annotations":{"readOnlyHint":true},"description":"Get recent network requests from the React Native app.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\" for aggregated requests. Defaults to current device.","type":"string"},"format":{"default":"text","description":"Return 'json' for a structured array of request objects","enum":["text","json"],"type":"string"},"limit":{"default":50,"description":"Maximum number of requests to return","type":"number"},"since":{"description":"Only return requests after this Unix timestamp (ms). Pass the timestamp of the last seen entry to fetch only new ones.","type":"number"},"summary":{"default":false,"description":"Return a one-line summary with counts","type":"boolean"}},"type":"object"},"name":"get_network_requests"},{"annotations":{"readOnlyHint":true},"description":"Get full details of a specific network request including headers and body.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\". Defaults to current device.","type":"string"},"index":{"default":-1,"description":"Index of the request if multiple match (-1 for last)","type":"number"},"url":{"description":"URL or partial URL to find the request","type":"string"}},"required":["url"],"type":"object"},"name":"get_request_details"},{"annotations":{"readOnlyHint":true},"description":"Get response body for a network request (cached if small; requires active session if large).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\". Defaults to current device.","type":"string"},"index":{"default":-1,"description":"Index of the request if multiple match (-1 for last)","type":"number"},"url":{"description":"URL or partial URL to find the request","type":"string"}},"required":["url"],"type":"object"},"name":"get_response_body"},{"annotations":{"readOnlyHint":true},"description":"Search network requests by URL pattern, method, or status code.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\". Defaults to current device.","type":"string"},"errorsOnly":{"default":false,"description":"Show only failed requests","type":"boolean"},"limit":{"default":20,"description":"Maximum number of results to return","type":"number"},"method":{"description":"HTTP method filter","type":"string"},"statusCode":{"description":"HTTP status code filter","type":"number"},"urlPattern":{"description":"URL substring or regex pattern","type":"string"}},"type":"object"},"name":"search_network"},{"annotations":{"destructiveHint":true,"idempotentHint":true},"description":"Clear the network request buffer.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key to clear, or omit for current device. Use \"all\" to clear all.","type":"string"}},"type":"object"},"name":"clear_network_requests"},{"annotations":{"readOnlyHint":true},"description":"Get aggregated network statistics: breakdown by domain, status code, and response times.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\". Defaults to current device.","type":"string"}},"type":"object"},"name":"get_network_stats"},{"_meta":{"ui":{"resourceUri":"ui://metro/errors"},"ui/resourceUri":"ui://metro/errors"},"annotations":{"readOnlyHint":true},"description":"Get recent uncaught exceptions from the React Native app.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\" for aggregated errors. Defaults to current device.","type":"string"},"format":{"default":"text","description":"Return 'json' for a structured array of error entries","enum":["text","json"],"type":"string"},"limit":{"default":20,"description":"Maximum number of errors to return","type":"number"},"since":{"description":"Only return entries after this Unix timestamp (ms). Pass the timestamp of the last seen entry to fetch only new ones.","type":"number"},"summary":{"default":false,"description":"Return a one-line summary with counts","type":"boolean"}},"type":"object"},"name":"get_errors"},{"annotations":{"destructiveHint":true,"idempotentHint":true},"description":"Clear the error buffer.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key to clear, or omit for current device. Use \"all\" to clear all.","type":"string"}},"type":"object"},"name":"clear_errors"},{"annotations":{"readOnlyHint":true},"description":"Get recent Metro compilation/transform errors.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"limit":{"default":20,"description":"Maximum errors to return","type":"number"}},"type":"object"},"name":"get_bundle_errors"},{"annotations":{"destructiveHint":true},"description":"Execute a JavaScript expression in the running React Native app and return the result. Use this for inspecting variables, calling functions, or querying app state.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"awaitPromise":{"default":true,"description":"Wait for promise to resolve if expression returns a promise","type":"boolean"},"expression":{"description":"JavaScript expression to evaluate","type":"string"}},"required":["expression"],"type":"object"},"name":"evaluate_js"},{"annotations":{"readOnlyHint":true},"description":"List connected devices and debuggable targets from Metro bundler.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"rescan":{"default":false,"description":"Rescan all Metro ports","type":"boolean"}},"type":"object"},"name":"list_devices"},{"annotations":{"readOnlyHint":true},"description":"Get information about the connected React Native app (bundle URL, platform, device name).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_app_info"},{"annotations":{"readOnlyHint":true},"description":"Check the connection status to Metro bundler.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_connection_status"},{"description":"Reload the connected app and verify a fresh runtime. Uses Page.reload, with a directed Metro message fallback only for a verified app/device peer.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"timeout":{"default":15000,"description":"Maximum time in milliseconds to submit and verify the reload","maximum":60000,"minimum":100,"type":"integer"}},"type":"object"},"name":"reload_app"},{"annotations":{"readOnlyHint":true},"description":"Symbolicate a stack trace using Metro bundler source maps. Converts minified/bundled locations back to original source files.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"stack":{"description":"Array of stack frames to symbolicate","items":{"properties":{"column":{"type":"number"},"file":{"type":"string"},"lineNumber":{"type":"number"},"methodName":{"type":"string"}},"required":["lineNumber","column"],"type":"object"},"type":"array"}},"required":["stack"],"type":"object"},"name":"symbolicate"},{"_meta":{"ui":{"resourceUri":"ui://metro/redux"},"ui/resourceUri":"ui://metro/redux"},"annotations":{"readOnlyHint":true},"description":"Get the current Redux state tree or a specific slice. Works without client SDK if Redux DevTools extension is present or store is exposed globally.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"compact":{"default":false,"description":"Return compact format","type":"boolean"},"path":{"description":"Dot-separated path to a state slice (e.g., \"user.profile\")","type":"string"}},"type":"object"},"name":"get_redux_state"},{"annotations":{"openWorldHint":false},"description":"Dispatch a Redux action to the store.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"payload":{"description":"Action payload"},"type":{"description":"Action type","type":"string"}},"required":["type"],"type":"object"},"name":"dispatch_redux_action"},{"annotations":{"readOnlyHint":true},"description":"Get recent Redux actions (requires metro-mcp client SDK for real-time tracking).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"limit":{"default":20,"description":"Maximum actions to return","type":"number"}},"type":"object"},"name":"get_redux_actions"},{"_meta":{"ui":{"resourceUri":"ui://metro/components"},"ui/resourceUri":"ui://metro/components"},"annotations":{"readOnlyHint":true},"description":"Get a paged flat React component tree. Follow nextCursor to complete the snapshot and check traversal.complete before treating an empty page as authoritative.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"cursor":{"description":"Opaque nextCursor returned by the previous page","type":"string"},"maxDepth":{"default":200,"description":"Maximum fiber depth to traverse (default 200, maximum 600)","maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"description":"Maximum fibers to scan (default 1200)","maximum":5000,"minimum":1,"type":"integer"},"pageSize":{"default":100,"description":"Nodes per page (default 100, maximum 250)","maximum":250,"minimum":1,"type":"integer"},"structureOnly":{"default":false,"description":"Return component names and selectors without props","type":"boolean"}},"type":"object"},"name":"get_component_tree"},{"annotations":{"readOnlyHint":true},"description":"Search for components by name inside the app runtime. Check traversal.complete before treating no matches as definitive.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"includeProps":{"default":true,"description":"Include component props in matches","type":"boolean"},"maxDepth":{"default":200,"description":"Maximum fiber depth to traverse (default 200, maximum 600)","maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"description":"Maximum fibers to scan (default 1200)","maximum":5000,"minimum":1,"type":"integer"},"pattern":{"description":"Case-insensitive component name pattern","type":"string"}},"required":["pattern"],"type":"object"},"name":"find_components"},{"annotations":{"readOnlyHint":true},"description":"Get props, state, and hooks for the first exact component-name match, with traversal completeness metadata.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"maxDepth":{"default":200,"description":"Maximum fiber depth to traverse (default 200, maximum 600)","maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"description":"Maximum fibers to scan (default 1200)","maximum":5000,"minimum":1,"type":"integer"},"name":{"description":"Exact component name to inspect","type":"string"}},"required":["name"],"type":"object"},"name":"inspect_component"},{"annotations":{"readOnlyHint":true},"description":"Get elements with testID or accessibilityLabel. Check traversal.complete before treating an empty elements array as definitive.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"maxDepth":{"default":200,"description":"Maximum fiber depth to traverse (default 200, maximum 600)","maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"description":"Maximum fibers to scan (default 1200)","maximum":5000,"minimum":1,"type":"integer"}},"type":"object"},"name":"get_testable_elements"},{"annotations":{"readOnlyHint":true},"description":"List all AsyncStorage keys in the React Native app.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_storage_keys"},{"annotations":{"readOnlyHint":true},"description":"Read a specific AsyncStorage key value.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"key":{"description":"AsyncStorage key to read","type":"string"}},"required":["key"],"type":"object"},"name":"get_storage_item"},{"annotations":{"readOnlyHint":true},"description":"Dump all AsyncStorage key-value pairs.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"maxLength":{"default":500,"description":"Max length for each value","type":"number"}},"type":"object"},"name":"get_all_storage"},{"annotations":{"openWorldHint":true},"description":"Capture a screenshot from the connected iOS simulator or Android device.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"delivery":{"default":"path","description":"Return a retained temporary file path or an inline MCP image","enum":["path","inline"],"type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"take_screenshot"},{"annotations":{"readOnlyHint":true},"description":"List available iOS simulators or Android emulators.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bootedOnly":{"default":false,"description":"Show only booted/running devices","type":"boolean"},"platform":{"default":"both","enum":["ios","android","both"],"type":"string"}},"type":"object"},"name":"list_simulators"},{"annotations":{"destructiveHint":true,"openWorldHint":true},"description":"Install a root certificate on the iOS simulator or Android device.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"certPath":{"description":"Path to the certificate file","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["certPath"],"type":"object"},"name":"install_certificate"},{"annotations":{"readOnlyHint":true},"description":"Get native platform logs from iOS simulator (syslog) or Android device (logcat).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"filter":{"description":"Filter string (process name for iOS, tag for Android)","type":"string"},"lines":{"default":50,"description":"Number of log lines to return","type":"number"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"get_native_logs"},{"annotations":{"destructiveHint":true},"description":"Launch, terminate, install, or uninstall an app on the simulator/emulator.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"action":{"description":"Action to perform","enum":["launch","terminate","install","uninstall"],"type":"string"},"appPath":{"description":"Path to .app or .apk file (for install)","type":"string"},"bundleId":{"description":"App bundle identifier (e.g., com.example.app)","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["action","bundleId"],"type":"object"},"name":"app_lifecycle"},{"annotations":{"readOnlyHint":true},"description":"Get the current screen orientation of the device.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"get_screen_orientation"},{"annotations":{"openWorldHint":true},"description":"Open a URL or deep link on the connected iOS simulator or Android device.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"},"url":{"description":"URL or deep link to open (e.g., \"myapp://screen/details\" or \"https://example.com/path\")","type":"string"}},"required":["url"],"type":"object"},"name":"open_deeplink"},{"annotations":{"readOnlyHint":true},"description":"List URL schemes registered by an installed iOS app or Android package.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"Bundle ID to check (auto-detected if not provided)","type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"list_url_schemes"},{"annotations":{"readOnlyHint":true},"description":"List all app permission statuses on the connected iOS simulator or Android emulator. Returns compact text: one name=status line per permission.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"Bundle ID (iOS) or package name (Android). Auto-detected if omitted.","type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"list_permissions"},{"annotations":{"destructiveHint":true},"description":"Grant a permission to the app on the connected iOS simulator or Android emulator.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"Bundle ID (iOS) or package name (Android). Auto-detected if omitted.","type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"},"service":{"description":"iOS: simctl service (calendar, contacts, contacts-limited, location, location-always, microphone, motion, photos, photos-add, media-library, reminders, siri). Android: runtime permission (e.g. \"CAMERA\" or \"android.permission.CAMERA\").","type":"string"}},"required":["service"],"type":"object"},"name":"grant_permission"},{"annotations":{"destructiveHint":true},"description":"Revoke a permission from the app on the connected iOS simulator or Android emulator.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"Bundle ID (iOS) or package name (Android). Auto-detected if omitted.","type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"},"service":{"description":"iOS: simctl service (calendar, contacts, contacts-limited, location, location-always, microphone, motion, photos, photos-add, media-library, reminders, siri). Android: runtime permission (e.g. \"CAMERA\" or \"android.permission.CAMERA\").","type":"string"}},"required":["service"],"type":"object"},"name":"revoke_permission"},{"annotations":{"destructiveHint":true},"description":"Reset one or all permissions for the app on the connected iOS simulator or Android emulator. On iOS, omitting service resets all services. On Android, omitting service resets all runtime permissions.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"Bundle ID (iOS) or package name (Android). Auto-detected if omitted.","type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"},"service":{"description":"iOS: specific service to reset (e.g. \"location\"); omit to reset all. Android: permission name (e.g. \"CAMERA\"); omit to reset all runtime permissions.","type":"string"}},"type":"object"},"name":"reset_permissions"},{"annotations":{"destructiveHint":false},"description":"Open the connected app's system settings page using React Native Linking.openSettings().","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"Bundle ID (iOS) or package name (Android). If supplied, it must match the connected app.","type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"open_app_settings"},{"annotations":{"readOnlyHint":true},"description":"Get labelled or interactive elements from the focused React screen. Check traversal.complete before treating an empty elements array as definitive.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"interactiveOnly":{"default":false,"description":"Return only elements with onPress handlers","type":"boolean"},"maxDepth":{"default":200,"maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"maximum":5000,"minimum":1,"type":"integer"}},"type":"object"},"name":"list_elements"},{"annotations":{"destructiveHint":false},"description":"Tap by label, testID, or logical device-point coordinates. Uses React handlers, then installed SimView or IDB on iOS and adb on Android. Coordinates use native input directly; native results identify the backend and dispatch state.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"label":{"description":"Accessibility label, aria-label, or testID to tap","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"},"x":{"description":"X coordinate","type":"number"},"y":{"description":"Y coordinate","type":"number"}},"type":"object"},"name":"tap_element"},{"annotations":{"destructiveHint":false},"description":"Type text into an input field. Targets a specific input by testID/label, or the first visible TextInput. Uses the React handler first, then SimView or IDB on iOS and the selected ADB serial on Android.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"},"testID":{"description":"testID or accessibilityLabel of the TextInput to target (defaults to first visible input)","type":"string"},"text":{"description":"Text to type","type":"string"}},"required":["text"],"type":"object"},"name":"type_text"},{"annotations":{"destructiveHint":false},"description":"Long press using a React handler by label/testID, then semantic native input through SimView or IDB when the handler is unavailable. Explicit coordinates use native input directly; native results identify the backend and dispatch state.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"duration":{"default":1000,"description":"Duration in milliseconds","type":"number"},"label":{"description":"Accessibility label or testID of the element to long press","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"},"x":{"description":"X coordinate","type":"number"},"y":{"description":"Y coordinate","type":"number"}},"type":"object"},"name":"long_press"},{"annotations":{"destructiveHint":false},"description":"Scroll through React, then use installed SimView or IDB on iOS and the selected ADB serial on Android. Native results identify the backend and dispatch state.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"direction":{"description":"Swipe direction","enum":["up","down","left","right"],"type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["direction"],"type":"object"},"name":"swipe"},{"annotations":{"destructiveHint":false},"description":"Press a device button (HOME, BACK, VOLUME_UP, etc.).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"button":{"description":"Button to press","enum":["HOME","BACK","VOLUME_UP","VOLUME_DOWN","POWER","ENTER","DELETE"],"type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["button"],"type":"object"},"name":"press_button"},{"_meta":{"ui":{"resourceUri":"ui://metro/navigation"},"ui/resourceUri":"ui://metro/navigation"},"annotations":{"readOnlyHint":true},"description":"Get the full React Navigation / Expo Router state tree including current route, params, and stack history.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"compact":{"default":false,"description":"Return compact format","type":"boolean"}},"type":"object"},"name":"get_navigation_state"},{"annotations":{"readOnlyHint":true},"description":"Get the currently focused route name and params.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_current_route"},{"annotations":{"readOnlyHint":true},"description":"Get the navigation back stack / history.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_route_history"},{"annotations":{"readOnlyHint":true},"description":"List registered route names from available navigation state. Uninitialized nested navigators are not discoverable.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"list_routes"},{"annotations":{"readOnlyHint":true},"description":"Audit the current screen within bounded Fiber traversal limits. Checks labels, roles, testIDs, and alt text; returns issues, summary, and traversal coverage.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"maxDepth":{"default":200,"description":"Maximum Fiber depth to inspect","maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"description":"Maximum Fibers to inspect","maximum":5000,"minimum":1,"type":"integer"},"severity":{"default":"all","description":"Filter by severity level","enum":["all","error","warning","info"],"type":"string"}},"type":"object"},"name":"audit_accessibility"},{"annotations":{"readOnlyHint":true},"description":"Check accessibility properties of a specific component by name or testID.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"name":{"description":"Component name to check","type":"string"},"testID":{"description":"testID to find","type":"string"}},"type":"object"},"name":"check_element_accessibility"},{"annotations":{"readOnlyHint":true},"description":"Quick overview: counts of elements with and without proper accessibility props.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_accessibility_summary"},{"annotations":{"readOnlyHint":true},"description":"List all custom commands registered by the app. Commands are registered on global.__METRO_BRIDGE__.commands or global.__METRO_BRIDGE_COMMANDS__.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"list_commands"},{"annotations":{"destructiveHint":true,"openWorldHint":true},"description":"Execute a custom command registered by the app. Pass parameters as a JSON object.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"name":{"description":"Command name to execute","type":"string"},"params":{"additionalProperties":{},"description":"Parameters to pass to the command","propertyNames":{"type":"string"},"type":"object"},"timeout":{"default":15000,"description":"Max ms to wait for async commands (default 15000)","type":"number"}},"required":["name"],"type":"object"},"name":"run_command"},{"annotations":{"destructiveHint":false,"idempotentHint":false},"description":"Inject interaction interceptors into the running app via the React fiber tree. Captures taps, text entry, long presses, keyboard submits, and scroll/swipe gestures — with no changes to your app code. Works with ScrollView, FlatList, SectionList, FlashList, and other scroll containers. Call stop_test_recording when done, then generate_test_from_recording to get the test.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"start_test_recording"},{"annotations":{"idempotentHint":false,"readOnlyHint":false},"description":"Stop the active recording, retrieve all captured events, and store them for test generation. Returns a summary of what was recorded. Call generate_test_from_recording next to produce Appium, Maestro, or Detox test code.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"stop_test_recording"},{"annotations":{"readOnlyHint":true},"description":"Convert the most recent recording into a test file. Supports three formats: appium (WebdriverIO + Mocha), maestro (YAML), and detox (Jest). Call stop_test_recording first.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"iOS bundle ID or Android app package","type":"string"},"format":{"description":"Output format","enum":["appium","maestro","detox"],"type":"string"},"includeSetup":{"default":true,"description":"Include WDIO configuration usage comments (the runner owns setup and teardown)","type":"boolean"},"platform":{"default":"ios","description":"Target platform (appium only)","enum":["ios","android","both"],"type":"string"},"testName":{"description":"Name for the test / describe block","type":"string"}},"required":["format"],"type":"object"},"name":"generate_test_from_recording"},{"annotations":{"readOnlyHint":true},"description":"Generate a minimal but runnable wdio.conf.ts for Appium + React Native testing, along with the npm install command.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"androidAppPath":{"description":"Path to the Android .apk when platform is both","type":"string"},"androidDeviceName":{"description":"Optional Android Appium device name when platform is both","type":"string"},"androidPackageName":{"description":"Android app package when platform is both","type":"string"},"androidPlatformVersion":{"description":"Optional Android version when platform is both","type":"string"},"androidUdid":{"description":"Optional Android device serial when platform is both","type":"string"},"appPath":{"description":"Path to .app / .apk (leave empty to use a running simulator)","type":"string"},"bundleId":{"description":"iOS bundle ID or Android app package","type":"string"},"deviceName":{"description":"Optional Appium device name for a single-platform config","type":"string"},"iosAppPath":{"description":"Path to the iOS .app when platform is both","type":"string"},"iosBundleId":{"description":"iOS bundle ID when platform is both","type":"string"},"iosDeviceName":{"description":"Optional iOS Appium device name when platform is both","type":"string"},"iosPlatformVersion":{"description":"Optional iOS version when platform is both","type":"string"},"iosUdid":{"description":"Optional iOS simulator UDID when platform is both","type":"string"},"noReset":{"default":true,"description":"Preserve installed app data; false allows Appium to reset the app","type":"boolean"},"outputPath":{"default":"./wdio.conf.ts","description":"Shown in the output, not written to disk","type":"string"},"platform":{"default":"ios","enum":["ios","android","both"],"type":"string"},"platformVersion":{"description":"Optional OS version for a single-platform config","type":"string"},"udid":{"description":"Optional device UDID / serial for a single-platform config","type":"string"}},"type":"object"},"name":"generate_wdio_config"},{"annotations":{"destructiveHint":false},"description":"Add a human-readable annotation (comment marker) to the current recording. Useful for labelling major flow checkpoints like \"reached checkout\", \"error appeared here\", \"navigated to payment\". Annotations appear as code comments in generated tests.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"note":{"description":"Annotation text to embed in the recording","type":"string"}},"required":["note"],"type":"object"},"name":"add_recording_annotation"},{"annotations":{"destructiveHint":false,"idempotentHint":true},"description":"Save the current recording events to disk as JSON so they can be reloaded later. Useful for regenerating the same flow in a different test format without re-recording. Files are saved to ~/.metro-mcp/recordings/<filename>.json.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"filename":{"description":"Name for the saved recording (without .json extension)","type":"string"}},"required":["filename"],"type":"object"},"name":"save_test_recording"},{"annotations":{"readOnlyHint":true},"description":"Load a previously saved recording from disk and make it available for test generation. After loading, call generate_test_from_recording with any format to regenerate the test. Use list_test_recordings to see available files.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"filename":{"description":"Name of the saved recording (without .json extension)","type":"string"}},"required":["filename"],"type":"object"},"name":"load_test_recording"},{"annotations":{"readOnlyHint":true},"description":"List all previously saved test recordings in ~/.metro-mcp/recordings/. Returns filenames and sizes. Use load_test_recording to load one for test generation.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"list_test_recordings"},{"annotations":{"destructiveHint":false,"idempotentHint":false},"description":"Start profiling the running React Native app. Primary path: injects into the React DevTools hook (__REACT_DEVTOOLS_GLOBAL_HOOK__) via evalInApp — captures all component render durations without requiring <Profiler> wrappers, works on all architectures. Fallback (legacy arch only): CDP Profiler domain for JS CPU call-graph sampling. Perform the interaction you want to measure, then call stop_profiling.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"samplingInterval":{"default":1000,"description":"CDP fallback only: sampling interval in microseconds (default 1000).","maximum":100000,"minimum":100,"type":"integer"}},"type":"object"},"name":"start_profiling"},{"annotations":{"idempotentHint":false,"readOnlyHint":false},"description":"Stop profiling and return an analysis of the captured data. DevTools hook mode: returns top components by total render duration across all commits. CDP mode: returns top JS functions by self time and total time. Must call start_profiling first.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"includeNative":{"default":false,"description":"CDP mode only: include native/internal Hermes frames.","type":"boolean"},"topN":{"default":20,"description":"Number of top entries to return.","maximum":100,"minimum":1,"type":"integer"}},"type":"object"},"name":"stop_profiling"},{"annotations":{"readOnlyHint":true},"description":"Check whether profiling is active, which mode is in use, and whether a previous profile is available.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_profile_status"},{"_meta":{"ui":{"resourceUri":"ui://metro/profiler/flamegraph"},"ui/resourceUri":"ui://metro/profiler/flamegraph"},"annotations":{"readOnlyHint":true},"description":"Return the current profiling results as a human-readable text chart. Shows React DevTools component profile (if captured), CPU flamegraph (if CDP profile captured), and React render data from <Profiler> components (if set up). Call stop_profiling first to populate the profile data.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_flamegraph"},{"annotations":{"readOnlyHint":true},"description":"Read React render timing data collected via <Profiler onRender={trackRender}>. Returns all recorded renders sorted by actualDuration descending, with memoization savings from baseDuration. Requires importing trackRender from metro-mcp/client. Use clear=true to reset the buffer.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"clear":{"default":false,"description":"Clear the render buffer after reading.","type":"boolean"}},"type":"object"},"name":"get_react_renders"},{"annotations":{"readOnlyHint":true},"description":"Get current JavaScript heap memory usage from the running app. Returns used heap, total heap, and heap size limit (when available). Call repeatedly to track memory growth over time or to detect leaks.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_memory_info"},{"annotations":{"readOnlyHint":true},"description":"Profile a specific JavaScript expression or code path in a single call. Starts profiling, evaluates the expression, waits for it to complete (plus optional extra duration), then stops and returns the top functions by self time. Use instead of calling start_profiling / stop_profiling manually for focused measurements.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"expression":{"description":"JavaScript expression to profile (can be an async IIFE)","type":"string"},"extraMs":{"default":0,"description":"Additional milliseconds to wait after the expression resolves before stopping (default 0)","maximum":30000,"minimum":0,"type":"integer"},"topN":{"default":15,"description":"Number of top functions to return","maximum":50,"minimum":1,"type":"integer"}},"required":["expression"],"type":"object"},"name":"profile_action"},{"annotations":{"destructiveHint":false,"idempotentHint":false},"description":"Start Hermes heap allocation sampling via CDP HeapProfiler. Records memory allocation call stacks to identify where objects are being allocated. Call stop_heap_sampling to retrieve the top allocation sites.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"samplingInterval":{"default":32768,"description":"Average bytes between samples (default 32768). Lower = more detail, higher overhead.","maximum":1048576,"minimum":128,"type":"integer"}},"type":"object"},"name":"start_heap_sampling"},{"annotations":{"idempotentHint":false,"readOnlyHint":false},"description":"Stop heap allocation sampling and return the top allocation sites. Shows which functions are allocating the most memory, useful for diagnosing memory leaks. Must call start_heap_sampling first.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"topN":{"default":20,"description":"Number of top allocation sites to return","maximum":100,"minimum":1,"type":"integer"}},"type":"object"},"name":"stop_heap_sampling"},{"annotations":{"readOnlyHint":true},"description":"Poll the component tree until an element matching the given testID or accessibilityLabel appears. Returns element info on success. Use after tap_element, navigate(), or any action that triggers async screen transitions or data loading — instead of immediately calling the next tool. Returns traversal metadata immediately when the bounded search is incomplete.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"maxDepth":{"default":200,"description":"Maximum fiber depth inspected per poll","maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"description":"Maximum fibers inspected per poll","maximum":5000,"minimum":1,"type":"integer"},"pollInterval":{"default":500,"description":"How often to check in milliseconds (default 500)","maximum":5000,"minimum":100,"type":"integer"},"selector":{"description":"testID or accessibilityLabel to wait for","type":"string"},"timeout":{"default":10000,"description":"Maximum wait time in milliseconds (default 10000)","maximum":60000,"minimum":100,"type":"integer"}},"required":["selector"],"type":"object"},"name":"wait_for_element"},{"annotations":{"readOnlyHint":true},"description":"Poll a JavaScript expression in the app until it returns a truthy value, then return that value. Useful for waiting on state changes, loading flags, API responses, or any async condition. Example: wait for globalThis.myStore?.isLoaded === true.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"expression":{"description":"JS expression to evaluate; polling stops when it returns truthy","type":"string"},"pollInterval":{"default":500,"description":"How often to check in milliseconds (default 500)","maximum":5000,"minimum":100,"type":"integer"},"timeout":{"default":10000,"description":"Maximum wait time in milliseconds (default 10000)","maximum":60000,"minimum":100,"type":"integer"}},"required":["expression"],"type":"object"},"name":"wait_for_condition"},{"annotations":{"readOnlyHint":true},"description":"Poll the active navigation route until it matches the expected route name, then return. Requires the navigation plugin to be set up (get_current_route must work). Use after tap_element on a link or after dispatching a navigate() action.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"routeName":{"description":"Expected route name to wait for (e.g. \"HomeScreen\", \"ProfileTab\")","type":"string"},"timeout":{"default":10000,"description":"Maximum wait time in milliseconds (default 10000)","maximum":60000,"minimum":100,"type":"integer"}},"required":["routeName"],"type":"object"},"name":"wait_for_navigation"},{"annotations":{"idempotentHint":true},"description":"Writes the Metro CDP connection status script to ~/.claude/metro-mcp-statusline.sh. Does not modify settings.json — tell the user to add it to their status line themselves (e.g. ask Claude: \"/statusline add the script at ~/.claude/metro-mcp-statusline.sh\"). Only works with Claude Code.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"setup_statusline"},{"annotations":{"readOnlyHint":true},"description":"Auto-discover well-known global debugging objects (Redux stores, Apollo Client, Expo Router, React DevTools hook, etc.) available in the app runtime.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"detailed":{"default":false,"description":"Include top-level keys for each discovered global","type":"boolean"}},"type":"object"},"name":"list_debug_globals"},{"annotations":{"readOnlyHint":true},"description":"Inspect the smallest measured host component at screen coordinates. Uses awaited Fabric/Paper measurement and returns traversal completeness metadata.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"includeProps":{"default":true,"description":"Include component props in the result","type":"boolean"},"maxDepth":{"default":200,"maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"maximum":5000,"minimum":1,"type":"integer"},"x":{"description":"X coordinate (points/dp)","type":"number"},"y":{"description":"Y coordinate (points/dp)","type":"number"}},"required":["x","y"],"type":"object"},"name":"inspect_at_point"},{"annotations":{"openWorldHint":true},"description":"Open the React Native DevTools debugger panel in Chrome. Connects through the CDP proxy so DevTools and the MCP can share the same Hermes connection.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"open":{"default":true,"description":"Attempt to open the browser automatically","type":"boolean"}},"type":"object"},"name":"open_devtools"},{"annotations":{"readOnlyHint":true},"description":"Get known app sandbox directory paths (documents, cache, temp, library). Returns absolute paths usable with list_directory and read_file.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"App bundle ID (iOS, e.g. com.example.app) or package name (Android). Required for iOS; used for Android private-directory resolution.","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"get_app_directories"},{"annotations":{"readOnlyHint":true},"description":"List files and directories in an app sandbox path. Call get_app_directories first to obtain the root path.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"App bundle ID (iOS) or package name (Android). Required when path is omitted; also used for Android run-as access.","type":"string"},"path":{"description":"Absolute directory path to list. Defaults to the app data container root (bundleId required).","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"},"recursive":{"default":false,"description":"Recursively list subdirectories (returns raw text)","type":"boolean"}},"type":"object"},"name":"list_directory"},{"annotations":{"readOnlyHint":true},"description":"Read the contents of a file from the app sandbox. Enforces a configurable size cap (default 50 KB, max 1 MB) to avoid flooding context.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"App package name (Android, for run-as access to private files)","type":"string"},"encoding":{"default":"utf8","description":"Output encoding. Use base64 for binary files (images, SQLite, etc.)","enum":["utf8","base64"],"type":"string"},"maxBytes":{"default":51200,"description":"Maximum bytes to read (default 50 KB, hard cap 1 MB)","type":"number"},"path":{"description":"Absolute path to the file","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["path"],"type":"object"},"name":"read_file"},{"annotations":{"readOnlyHint":true},"description":"Get file or directory metadata: size, modification date, and whether it is a directory.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"App package name (Android, for run-as)","type":"string"},"path":{"description":"Absolute path to the file or directory","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["path"],"type":"object"},"name":"get_file_info"},{"annotations":{"destructiveHint":true},"description":"Delete a file from the app sandbox. Requires confirm: true to prevent accidental deletion.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"App package name (Android, for run-as)","type":"string"},"confirm":{"description":"Must be set to true to confirm the deletion","type":"boolean"},"path":{"description":"Absolute path to the file to delete","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["path","confirm"],"type":"object"},"name":"delete_file"},{"annotations":{"readOnlyHint":true},"description":"Return build-time and runtime flags for the running React Native app: __DEV__, platform, OS version, RN version, Hermes engine, New Architecture, and expo-application fields if available.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_build_info"},{"annotations":{"readOnlyHint":true},"description":"Return a filtered subset of process.env from the running app. Credential-like keys (SECRET, KEY, TOKEN, PASSWORD, etc.) are redacted by default. Use filter to search by key name substring.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"filter":{"description":"Substring to match against env var key names (case-insensitive)","type":"string"},"includeAll":{"default":false,"description":"When true, includes credential keys that are otherwise redacted","type":"boolean"}},"type":"object"},"name":"get_env_vars"},{"annotations":{"readOnlyHint":true},"description":"Return the full Platform.constants object from React Native, including OS-specific build details.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_platform_constants"},{"annotations":{"readOnlyHint":true},"description":"Return expo-constants manifest/expoConfig fields if the app uses Expo, otherwise null.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_expo_config"}],"ttlMs":0}}}
{"at":"2026-11-22T23:58:34.864Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-22T23:58:35.579Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{"listChanged":true},"resources":{"listChanged":true,"subscribe":true},"tools":{"listChanged":true}},"instructions":"React Native runtime debugging MCP server. Connects to Metro bundler via Chrome DevTools Protocol to provide console logs, network requests, component tree inspection, state management debugging, device control, and more. Use list_devices to see connected targets, then use other tools to inspect and interact with the running app.","protocolVersion":"2025-11-25","serverInfo":{"name":"metro-mcp","version":"0.15.0"}}}}
{"at":"2026-11-22T23:58:35.579Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-22T23:58:35.579Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-22T23:58:35.597Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"_meta":{"ui":{"resourceUri":"ui://metro/console"},"ui/resourceUri":"ui://metro/console"},"annotations":{"readOnlyHint":true},"description":"Get recent console output. Filter by level or search text.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\" for aggregated logs. Defaults to current device.","type":"string"},"format":{"default":"text","description":"Return 'json' for a structured array of log entries","enum":["text","json"],"type":"string"},"level":{"description":"Filter by log level","enum":["log","warn","error","info","debug"],"type":"string"},"limit":{"default":50,"description":"Maximum number of logs to return","type":"number"},"search":{"description":"Search text to filter logs","type":"string"},"since":{"description":"Only return entries after this Unix timestamp (ms). Pass the timestamp of the last seen entry to fetch only new ones.","type":"number"},"summary":{"default":false,"description":"Return a one-line summary with counts","type":"boolean"}},"type":"object"},"name":"get_console_logs"},{"annotations":{"destructiveHint":true,"idempotentHint":true},"description":"Clear the console log buffer.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key to clear, or omit for current device. Use \"all\" to clear all.","type":"string"}},"type":"object"},"name":"clear_console_logs"},{"_meta":{"ui":{"resourceUri":"ui://metro/network"},"ui/resourceUri":"ui://metro/network"},"annotations":{"readOnlyHint":true},"description":"Get recent network requests from the React Native app.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\" for aggregated requests. Defaults to current device.","type":"string"},"format":{"default":"text","description":"Return 'json' for a structured array of request objects","enum":["text","json"],"type":"string"},"limit":{"default":50,"description":"Maximum number of requests to return","type":"number"},"since":{"description":"Only return requests after this Unix timestamp (ms). Pass the timestamp of the last seen entry to fetch only new ones.","type":"number"},"summary":{"default":false,"description":"Return a one-line summary with counts","type":"boolean"}},"type":"object"},"name":"get_network_requests"},{"annotations":{"readOnlyHint":true},"description":"Get full details of a specific network request including headers and body.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\". Defaults to current device.","type":"string"},"index":{"default":-1,"description":"Index of the request if multiple match (-1 for last)","type":"number"},"url":{"description":"URL or partial URL to find the request","type":"string"}},"required":["url"],"type":"object"},"name":"get_request_details"},{"annotations":{"readOnlyHint":true},"description":"Get response body for a network request (cached if small; requires active session if large).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\". Defaults to current device.","type":"string"},"index":{"default":-1,"description":"Index of the request if multiple match (-1 for last)","type":"number"},"url":{"description":"URL or partial URL to find the request","type":"string"}},"required":["url"],"type":"object"},"name":"get_response_body"},{"annotations":{"readOnlyHint":true},"description":"Search network requests by URL pattern, method, or status code.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\". Defaults to current device.","type":"string"},"errorsOnly":{"default":false,"description":"Show only failed requests","type":"boolean"},"limit":{"default":20,"description":"Maximum number of results to return","type":"number"},"method":{"description":"HTTP method filter","type":"string"},"statusCode":{"description":"HTTP status code filter","type":"number"},"urlPattern":{"description":"URL substring or regex pattern","type":"string"}},"type":"object"},"name":"search_network"},{"annotations":{"destructiveHint":true,"idempotentHint":true},"description":"Clear the network request buffer.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key to clear, or omit for current device. Use \"all\" to clear all.","type":"string"}},"type":"object"},"name":"clear_network_requests"},{"annotations":{"readOnlyHint":true},"description":"Get aggregated network statistics: breakdown by domain, status code, and response times.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\". Defaults to current device.","type":"string"}},"type":"object"},"name":"get_network_stats"},{"_meta":{"ui":{"resourceUri":"ui://metro/errors"},"ui/resourceUri":"ui://metro/errors"},"annotations":{"readOnlyHint":true},"description":"Get recent uncaught exceptions from the React Native app.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key or \"all\" for aggregated errors. Defaults to current device.","type":"string"},"format":{"default":"text","description":"Return 'json' for a structured array of error entries","enum":["text","json"],"type":"string"},"limit":{"default":20,"description":"Maximum number of errors to return","type":"number"},"since":{"description":"Only return entries after this Unix timestamp (ms). Pass the timestamp of the last seen entry to fetch only new ones.","type":"number"},"summary":{"default":false,"description":"Return a one-line summary with counts","type":"boolean"}},"type":"object"},"name":"get_errors"},{"annotations":{"destructiveHint":true,"idempotentHint":true},"description":"Clear the error buffer.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device":{"description":"Device key to clear, or omit for current device. Use \"all\" to clear all.","type":"string"}},"type":"object"},"name":"clear_errors"},{"annotations":{"readOnlyHint":true},"description":"Get recent Metro compilation/transform errors.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"limit":{"default":20,"description":"Maximum errors to return","type":"number"}},"type":"object"},"name":"get_bundle_errors"},{"annotations":{"destructiveHint":true},"description":"Execute a JavaScript expression in the running React Native app and return the result. Use this for inspecting variables, calling functions, or querying app state.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"awaitPromise":{"default":true,"description":"Wait for promise to resolve if expression returns a promise","type":"boolean"},"expression":{"description":"JavaScript expression to evaluate","type":"string"}},"required":["expression"],"type":"object"},"name":"evaluate_js"},{"annotations":{"readOnlyHint":true},"description":"List connected devices and debuggable targets from Metro bundler.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"rescan":{"default":false,"description":"Rescan all Metro ports","type":"boolean"}},"type":"object"},"name":"list_devices"},{"annotations":{"readOnlyHint":true},"description":"Get information about the connected React Native app (bundle URL, platform, device name).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_app_info"},{"annotations":{"readOnlyHint":true},"description":"Check the connection status to Metro bundler.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_connection_status"},{"description":"Reload the connected app and verify a fresh runtime. Uses Page.reload, with a directed Metro message fallback only for a verified app/device peer.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"timeout":{"default":15000,"description":"Maximum time in milliseconds to submit and verify the reload","maximum":60000,"minimum":100,"type":"integer"}},"type":"object"},"name":"reload_app"},{"annotations":{"readOnlyHint":true},"description":"Symbolicate a stack trace using Metro bundler source maps. Converts minified/bundled locations back to original source files.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"stack":{"description":"Array of stack frames to symbolicate","items":{"properties":{"column":{"type":"number"},"file":{"type":"string"},"lineNumber":{"type":"number"},"methodName":{"type":"string"}},"required":["lineNumber","column"],"type":"object"},"type":"array"}},"required":["stack"],"type":"object"},"name":"symbolicate"},{"_meta":{"ui":{"resourceUri":"ui://metro/redux"},"ui/resourceUri":"ui://metro/redux"},"annotations":{"readOnlyHint":true},"description":"Get the current Redux state tree or a specific slice. Works without client SDK if Redux DevTools extension is present or store is exposed globally.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"compact":{"default":false,"description":"Return compact format","type":"boolean"},"path":{"description":"Dot-separated path to a state slice (e.g., \"user.profile\")","type":"string"}},"type":"object"},"name":"get_redux_state"},{"annotations":{"openWorldHint":false},"description":"Dispatch a Redux action to the store.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"payload":{"description":"Action payload"},"type":{"description":"Action type","type":"string"}},"required":["type"],"type":"object"},"name":"dispatch_redux_action"},{"annotations":{"readOnlyHint":true},"description":"Get recent Redux actions (requires metro-mcp client SDK for real-time tracking).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"limit":{"default":20,"description":"Maximum actions to return","type":"number"}},"type":"object"},"name":"get_redux_actions"},{"_meta":{"ui":{"resourceUri":"ui://metro/components"},"ui/resourceUri":"ui://metro/components"},"annotations":{"readOnlyHint":true},"description":"Get a paged flat React component tree. Follow nextCursor to complete the snapshot and check traversal.complete before treating an empty page as authoritative.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"cursor":{"description":"Opaque nextCursor returned by the previous page","type":"string"},"maxDepth":{"default":200,"description":"Maximum fiber depth to traverse (default 200, maximum 600)","maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"description":"Maximum fibers to scan (default 1200)","maximum":5000,"minimum":1,"type":"integer"},"pageSize":{"default":100,"description":"Nodes per page (default 100, maximum 250)","maximum":250,"minimum":1,"type":"integer"},"structureOnly":{"default":false,"description":"Return component names and selectors without props","type":"boolean"}},"type":"object"},"name":"get_component_tree"},{"annotations":{"readOnlyHint":true},"description":"Search for components by name inside the app runtime. Check traversal.complete before treating no matches as definitive.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"includeProps":{"default":true,"description":"Include component props in matches","type":"boolean"},"maxDepth":{"default":200,"description":"Maximum fiber depth to traverse (default 200, maximum 600)","maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"description":"Maximum fibers to scan (default 1200)","maximum":5000,"minimum":1,"type":"integer"},"pattern":{"description":"Case-insensitive component name pattern","type":"string"}},"required":["pattern"],"type":"object"},"name":"find_components"},{"annotations":{"readOnlyHint":true},"description":"Get props, state, and hooks for the first exact component-name match, with traversal completeness metadata.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"maxDepth":{"default":200,"description":"Maximum fiber depth to traverse (default 200, maximum 600)","maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"description":"Maximum fibers to scan (default 1200)","maximum":5000,"minimum":1,"type":"integer"},"name":{"description":"Exact component name to inspect","type":"string"}},"required":["name"],"type":"object"},"name":"inspect_component"},{"annotations":{"readOnlyHint":true},"description":"Get elements with testID or accessibilityLabel. Check traversal.complete before treating an empty elements array as definitive.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"maxDepth":{"default":200,"description":"Maximum fiber depth to traverse (default 200, maximum 600)","maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"description":"Maximum fibers to scan (default 1200)","maximum":5000,"minimum":1,"type":"integer"}},"type":"object"},"name":"get_testable_elements"},{"annotations":{"readOnlyHint":true},"description":"List all AsyncStorage keys in the React Native app.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_storage_keys"},{"annotations":{"readOnlyHint":true},"description":"Read a specific AsyncStorage key value.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"key":{"description":"AsyncStorage key to read","type":"string"}},"required":["key"],"type":"object"},"name":"get_storage_item"},{"annotations":{"readOnlyHint":true},"description":"Dump all AsyncStorage key-value pairs.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"maxLength":{"default":500,"description":"Max length for each value","type":"number"}},"type":"object"},"name":"get_all_storage"},{"annotations":{"openWorldHint":true},"description":"Capture a screenshot from the connected iOS simulator or Android device.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"delivery":{"default":"path","description":"Return a retained temporary file path or an inline MCP image","enum":["path","inline"],"type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"take_screenshot"},{"annotations":{"readOnlyHint":true},"description":"List available iOS simulators or Android emulators.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bootedOnly":{"default":false,"description":"Show only booted/running devices","type":"boolean"},"platform":{"default":"both","enum":["ios","android","both"],"type":"string"}},"type":"object"},"name":"list_simulators"},{"annotations":{"destructiveHint":true,"openWorldHint":true},"description":"Install a root certificate on the iOS simulator or Android device.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"certPath":{"description":"Path to the certificate file","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["certPath"],"type":"object"},"name":"install_certificate"},{"annotations":{"readOnlyHint":true},"description":"Get native platform logs from iOS simulator (syslog) or Android device (logcat).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"filter":{"description":"Filter string (process name for iOS, tag for Android)","type":"string"},"lines":{"default":50,"description":"Number of log lines to return","type":"number"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"get_native_logs"},{"annotations":{"destructiveHint":true},"description":"Launch, terminate, install, or uninstall an app on the simulator/emulator.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"action":{"description":"Action to perform","enum":["launch","terminate","install","uninstall"],"type":"string"},"appPath":{"description":"Path to .app or .apk file (for install)","type":"string"},"bundleId":{"description":"App bundle identifier (e.g., com.example.app)","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["action","bundleId"],"type":"object"},"name":"app_lifecycle"},{"annotations":{"readOnlyHint":true},"description":"Get the current screen orientation of the device.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"get_screen_orientation"},{"annotations":{"openWorldHint":true},"description":"Open a URL or deep link on the connected iOS simulator or Android device.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"},"url":{"description":"URL or deep link to open (e.g., \"myapp://screen/details\" or \"https://example.com/path\")","type":"string"}},"required":["url"],"type":"object"},"name":"open_deeplink"},{"annotations":{"readOnlyHint":true},"description":"List URL schemes registered by an installed iOS app or Android package.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"Bundle ID to check (auto-detected if not provided)","type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"list_url_schemes"},{"annotations":{"readOnlyHint":true},"description":"List all app permission statuses on the connected iOS simulator or Android emulator. Returns compact text: one name=status line per permission.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"Bundle ID (iOS) or package name (Android). Auto-detected if omitted.","type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"list_permissions"},{"annotations":{"destructiveHint":true},"description":"Grant a permission to the app on the connected iOS simulator or Android emulator.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"Bundle ID (iOS) or package name (Android). Auto-detected if omitted.","type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"},"service":{"description":"iOS: simctl service (calendar, contacts, contacts-limited, location, location-always, microphone, motion, photos, photos-add, media-library, reminders, siri). Android: runtime permission (e.g. \"CAMERA\" or \"android.permission.CAMERA\").","type":"string"}},"required":["service"],"type":"object"},"name":"grant_permission"},{"annotations":{"destructiveHint":true},"description":"Revoke a permission from the app on the connected iOS simulator or Android emulator.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"Bundle ID (iOS) or package name (Android). Auto-detected if omitted.","type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"},"service":{"description":"iOS: simctl service (calendar, contacts, contacts-limited, location, location-always, microphone, motion, photos, photos-add, media-library, reminders, siri). Android: runtime permission (e.g. \"CAMERA\" or \"android.permission.CAMERA\").","type":"string"}},"required":["service"],"type":"object"},"name":"revoke_permission"},{"annotations":{"destructiveHint":true},"description":"Reset one or all permissions for the app on the connected iOS simulator or Android emulator. On iOS, omitting service resets all services. On Android, omitting service resets all runtime permissions.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"Bundle ID (iOS) or package name (Android). Auto-detected if omitted.","type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"},"service":{"description":"iOS: specific service to reset (e.g. \"location\"); omit to reset all. Android: permission name (e.g. \"CAMERA\"); omit to reset all runtime permissions.","type":"string"}},"type":"object"},"name":"reset_permissions"},{"annotations":{"destructiveHint":false},"description":"Open the connected app's system settings page using React Native Linking.openSettings().","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"Bundle ID (iOS) or package name (Android). If supplied, it must match the connected app.","type":"string"},"platform":{"default":"auto","description":"Target platform","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"open_app_settings"},{"annotations":{"readOnlyHint":true},"description":"Get labelled or interactive elements from the focused React screen. Check traversal.complete before treating an empty elements array as definitive.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"interactiveOnly":{"default":false,"description":"Return only elements with onPress handlers","type":"boolean"},"maxDepth":{"default":200,"maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"maximum":5000,"minimum":1,"type":"integer"}},"type":"object"},"name":"list_elements"},{"annotations":{"destructiveHint":false},"description":"Tap by label, testID, or logical device-point coordinates. Uses React handlers, then installed SimView or IDB on iOS and adb on Android. Coordinates use native input directly; native results identify the backend and dispatch state.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"label":{"description":"Accessibility label, aria-label, or testID to tap","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"},"x":{"description":"X coordinate","type":"number"},"y":{"description":"Y coordinate","type":"number"}},"type":"object"},"name":"tap_element"},{"annotations":{"destructiveHint":false},"description":"Type text into an input field. Targets a specific input by testID/label, or the first visible TextInput. Uses the React handler first, then SimView or IDB on iOS and the selected ADB serial on Android.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"},"testID":{"description":"testID or accessibilityLabel of the TextInput to target (defaults to first visible input)","type":"string"},"text":{"description":"Text to type","type":"string"}},"required":["text"],"type":"object"},"name":"type_text"},{"annotations":{"destructiveHint":false},"description":"Long press using a React handler by label/testID, then semantic native input through SimView or IDB when the handler is unavailable. Explicit coordinates use native input directly; native results identify the backend and dispatch state.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"duration":{"default":1000,"description":"Duration in milliseconds","type":"number"},"label":{"description":"Accessibility label or testID of the element to long press","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"},"x":{"description":"X coordinate","type":"number"},"y":{"description":"Y coordinate","type":"number"}},"type":"object"},"name":"long_press"},{"annotations":{"destructiveHint":false},"description":"Scroll through React, then use installed SimView or IDB on iOS and the selected ADB serial on Android. Native results identify the backend and dispatch state.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"direction":{"description":"Swipe direction","enum":["up","down","left","right"],"type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["direction"],"type":"object"},"name":"swipe"},{"annotations":{"destructiveHint":false},"description":"Press a device button (HOME, BACK, VOLUME_UP, etc.).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"button":{"description":"Button to press","enum":["HOME","BACK","VOLUME_UP","VOLUME_DOWN","POWER","ENTER","DELETE"],"type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["button"],"type":"object"},"name":"press_button"},{"_meta":{"ui":{"resourceUri":"ui://metro/navigation"},"ui/resourceUri":"ui://metro/navigation"},"annotations":{"readOnlyHint":true},"description":"Get the full React Navigation / Expo Router state tree including current route, params, and stack history.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"compact":{"default":false,"description":"Return compact format","type":"boolean"}},"type":"object"},"name":"get_navigation_state"},{"annotations":{"readOnlyHint":true},"description":"Get the currently focused route name and params.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_current_route"},{"annotations":{"readOnlyHint":true},"description":"Get the navigation back stack / history.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_route_history"},{"annotations":{"readOnlyHint":true},"description":"List registered route names from available navigation state. Uninitialized nested navigators are not discoverable.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"list_routes"},{"annotations":{"readOnlyHint":true},"description":"Audit the current screen within bounded Fiber traversal limits. Checks labels, roles, testIDs, and alt text; returns issues, summary, and traversal coverage.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"maxDepth":{"default":200,"description":"Maximum Fiber depth to inspect","maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"description":"Maximum Fibers to inspect","maximum":5000,"minimum":1,"type":"integer"},"severity":{"default":"all","description":"Filter by severity level","enum":["all","error","warning","info"],"type":"string"}},"type":"object"},"name":"audit_accessibility"},{"annotations":{"readOnlyHint":true},"description":"Check accessibility properties of a specific component by name or testID.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"name":{"description":"Component name to check","type":"string"},"testID":{"description":"testID to find","type":"string"}},"type":"object"},"name":"check_element_accessibility"},{"annotations":{"readOnlyHint":true},"description":"Quick overview: counts of elements with and without proper accessibility props.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_accessibility_summary"},{"annotations":{"readOnlyHint":true},"description":"List all custom commands registered by the app. Commands are registered on global.__METRO_BRIDGE__.commands or global.__METRO_BRIDGE_COMMANDS__.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"list_commands"},{"annotations":{"destructiveHint":true,"openWorldHint":true},"description":"Execute a custom command registered by the app. Pass parameters as a JSON object.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"name":{"description":"Command name to execute","type":"string"},"params":{"additionalProperties":{},"description":"Parameters to pass to the command","propertyNames":{"type":"string"},"type":"object"},"timeout":{"default":15000,"description":"Max ms to wait for async commands (default 15000)","type":"number"}},"required":["name"],"type":"object"},"name":"run_command"},{"annotations":{"destructiveHint":false,"idempotentHint":false},"description":"Inject interaction interceptors into the running app via the React fiber tree. Captures taps, text entry, long presses, keyboard submits, and scroll/swipe gestures — with no changes to your app code. Works with ScrollView, FlatList, SectionList, FlashList, and other scroll containers. Call stop_test_recording when done, then generate_test_from_recording to get the test.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"start_test_recording"},{"annotations":{"idempotentHint":false,"readOnlyHint":false},"description":"Stop the active recording, retrieve all captured events, and store them for test generation. Returns a summary of what was recorded. Call generate_test_from_recording next to produce Appium, Maestro, or Detox test code.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"stop_test_recording"},{"annotations":{"readOnlyHint":true},"description":"Convert the most recent recording into a test file. Supports three formats: appium (WebdriverIO + Mocha), maestro (YAML), and detox (Jest). Call stop_test_recording first.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"iOS bundle ID or Android app package","type":"string"},"format":{"description":"Output format","enum":["appium","maestro","detox"],"type":"string"},"includeSetup":{"default":true,"description":"Include WDIO configuration usage comments (the runner owns setup and teardown)","type":"boolean"},"platform":{"default":"ios","description":"Target platform (appium only)","enum":["ios","android","both"],"type":"string"},"testName":{"description":"Name for the test / describe block","type":"string"}},"required":["format"],"type":"object"},"name":"generate_test_from_recording"},{"annotations":{"readOnlyHint":true},"description":"Generate a minimal but runnable wdio.conf.ts for Appium + React Native testing, along with the npm install command.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"androidAppPath":{"description":"Path to the Android .apk when platform is both","type":"string"},"androidDeviceName":{"description":"Optional Android Appium device name when platform is both","type":"string"},"androidPackageName":{"description":"Android app package when platform is both","type":"string"},"androidPlatformVersion":{"description":"Optional Android version when platform is both","type":"string"},"androidUdid":{"description":"Optional Android device serial when platform is both","type":"string"},"appPath":{"description":"Path to .app / .apk (leave empty to use a running simulator)","type":"string"},"bundleId":{"description":"iOS bundle ID or Android app package","type":"string"},"deviceName":{"description":"Optional Appium device name for a single-platform config","type":"string"},"iosAppPath":{"description":"Path to the iOS .app when platform is both","type":"string"},"iosBundleId":{"description":"iOS bundle ID when platform is both","type":"string"},"iosDeviceName":{"description":"Optional iOS Appium device name when platform is both","type":"string"},"iosPlatformVersion":{"description":"Optional iOS version when platform is both","type":"string"},"iosUdid":{"description":"Optional iOS simulator UDID when platform is both","type":"string"},"noReset":{"default":true,"description":"Preserve installed app data; false allows Appium to reset the app","type":"boolean"},"outputPath":{"default":"./wdio.conf.ts","description":"Shown in the output, not written to disk","type":"string"},"platform":{"default":"ios","enum":["ios","android","both"],"type":"string"},"platformVersion":{"description":"Optional OS version for a single-platform config","type":"string"},"udid":{"description":"Optional device UDID / serial for a single-platform config","type":"string"}},"type":"object"},"name":"generate_wdio_config"},{"annotations":{"destructiveHint":false},"description":"Add a human-readable annotation (comment marker) to the current recording. Useful for labelling major flow checkpoints like \"reached checkout\", \"error appeared here\", \"navigated to payment\". Annotations appear as code comments in generated tests.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"note":{"description":"Annotation text to embed in the recording","type":"string"}},"required":["note"],"type":"object"},"name":"add_recording_annotation"},{"annotations":{"destructiveHint":false,"idempotentHint":true},"description":"Save the current recording events to disk as JSON so they can be reloaded later. Useful for regenerating the same flow in a different test format without re-recording. Files are saved to ~/.metro-mcp/recordings/<filename>.json.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"filename":{"description":"Name for the saved recording (without .json extension)","type":"string"}},"required":["filename"],"type":"object"},"name":"save_test_recording"},{"annotations":{"readOnlyHint":true},"description":"Load a previously saved recording from disk and make it available for test generation. After loading, call generate_test_from_recording with any format to regenerate the test. Use list_test_recordings to see available files.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"filename":{"description":"Name of the saved recording (without .json extension)","type":"string"}},"required":["filename"],"type":"object"},"name":"load_test_recording"},{"annotations":{"readOnlyHint":true},"description":"List all previously saved test recordings in ~/.metro-mcp/recordings/. Returns filenames and sizes. Use load_test_recording to load one for test generation.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"list_test_recordings"},{"annotations":{"destructiveHint":false,"idempotentHint":false},"description":"Start profiling the running React Native app. Primary path: injects into the React DevTools hook (__REACT_DEVTOOLS_GLOBAL_HOOK__) via evalInApp — captures all component render durations without requiring <Profiler> wrappers, works on all architectures. Fallback (legacy arch only): CDP Profiler domain for JS CPU call-graph sampling. Perform the interaction you want to measure, then call stop_profiling.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"samplingInterval":{"default":1000,"description":"CDP fallback only: sampling interval in microseconds (default 1000).","maximum":100000,"minimum":100,"type":"integer"}},"type":"object"},"name":"start_profiling"},{"annotations":{"idempotentHint":false,"readOnlyHint":false},"description":"Stop profiling and return an analysis of the captured data. DevTools hook mode: returns top components by total render duration across all commits. CDP mode: returns top JS functions by self time and total time. Must call start_profiling first.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"includeNative":{"default":false,"description":"CDP mode only: include native/internal Hermes frames.","type":"boolean"},"topN":{"default":20,"description":"Number of top entries to return.","maximum":100,"minimum":1,"type":"integer"}},"type":"object"},"name":"stop_profiling"},{"annotations":{"readOnlyHint":true},"description":"Check whether profiling is active, which mode is in use, and whether a previous profile is available.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_profile_status"},{"_meta":{"ui":{"resourceUri":"ui://metro/profiler/flamegraph"},"ui/resourceUri":"ui://metro/profiler/flamegraph"},"annotations":{"readOnlyHint":true},"description":"Return the current profiling results as a human-readable text chart. Shows React DevTools component profile (if captured), CPU flamegraph (if CDP profile captured), and React render data from <Profiler> components (if set up). Call stop_profiling first to populate the profile data.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_flamegraph"},{"annotations":{"readOnlyHint":true},"description":"Read React render timing data collected via <Profiler onRender={trackRender}>. Returns all recorded renders sorted by actualDuration descending, with memoization savings from baseDuration. Requires importing trackRender from metro-mcp/client. Use clear=true to reset the buffer.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"clear":{"default":false,"description":"Clear the render buffer after reading.","type":"boolean"}},"type":"object"},"name":"get_react_renders"},{"annotations":{"readOnlyHint":true},"description":"Get current JavaScript heap memory usage from the running app. Returns used heap, total heap, and heap size limit (when available). Call repeatedly to track memory growth over time or to detect leaks.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_memory_info"},{"annotations":{"readOnlyHint":true},"description":"Profile a specific JavaScript expression or code path in a single call. Starts profiling, evaluates the expression, waits for it to complete (plus optional extra duration), then stops and returns the top functions by self time. Use instead of calling start_profiling / stop_profiling manually for focused measurements.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"expression":{"description":"JavaScript expression to profile (can be an async IIFE)","type":"string"},"extraMs":{"default":0,"description":"Additional milliseconds to wait after the expression resolves before stopping (default 0)","maximum":30000,"minimum":0,"type":"integer"},"topN":{"default":15,"description":"Number of top functions to return","maximum":50,"minimum":1,"type":"integer"}},"required":["expression"],"type":"object"},"name":"profile_action"},{"annotations":{"destructiveHint":false,"idempotentHint":false},"description":"Start Hermes heap allocation sampling via CDP HeapProfiler. Records memory allocation call stacks to identify where objects are being allocated. Call stop_heap_sampling to retrieve the top allocation sites.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"samplingInterval":{"default":32768,"description":"Average bytes between samples (default 32768). Lower = more detail, higher overhead.","maximum":1048576,"minimum":128,"type":"integer"}},"type":"object"},"name":"start_heap_sampling"},{"annotations":{"idempotentHint":false,"readOnlyHint":false},"description":"Stop heap allocation sampling and return the top allocation sites. Shows which functions are allocating the most memory, useful for diagnosing memory leaks. Must call start_heap_sampling first.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"topN":{"default":20,"description":"Number of top allocation sites to return","maximum":100,"minimum":1,"type":"integer"}},"type":"object"},"name":"stop_heap_sampling"},{"annotations":{"readOnlyHint":true},"description":"Poll the component tree until an element matching the given testID or accessibilityLabel appears. Returns element info on success. Use after tap_element, navigate(), or any action that triggers async screen transitions or data loading — instead of immediately calling the next tool. Returns traversal metadata immediately when the bounded search is incomplete.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"maxDepth":{"default":200,"description":"Maximum fiber depth inspected per poll","maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"description":"Maximum fibers inspected per poll","maximum":5000,"minimum":1,"type":"integer"},"pollInterval":{"default":500,"description":"How often to check in milliseconds (default 500)","maximum":5000,"minimum":100,"type":"integer"},"selector":{"description":"testID or accessibilityLabel to wait for","type":"string"},"timeout":{"default":10000,"description":"Maximum wait time in milliseconds (default 10000)","maximum":60000,"minimum":100,"type":"integer"}},"required":["selector"],"type":"object"},"name":"wait_for_element"},{"annotations":{"readOnlyHint":true},"description":"Poll a JavaScript expression in the app until it returns a truthy value, then return that value. Useful for waiting on state changes, loading flags, API responses, or any async condition. Example: wait for globalThis.myStore?.isLoaded === true.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"expression":{"description":"JS expression to evaluate; polling stops when it returns truthy","type":"string"},"pollInterval":{"default":500,"description":"How often to check in milliseconds (default 500)","maximum":5000,"minimum":100,"type":"integer"},"timeout":{"default":10000,"description":"Maximum wait time in milliseconds (default 10000)","maximum":60000,"minimum":100,"type":"integer"}},"required":["expression"],"type":"object"},"name":"wait_for_condition"},{"annotations":{"readOnlyHint":true},"description":"Poll the active navigation route until it matches the expected route name, then return. Requires the navigation plugin to be set up (get_current_route must work). Use after tap_element on a link or after dispatching a navigate() action.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"routeName":{"description":"Expected route name to wait for (e.g. \"HomeScreen\", \"ProfileTab\")","type":"string"},"timeout":{"default":10000,"description":"Maximum wait time in milliseconds (default 10000)","maximum":60000,"minimum":100,"type":"integer"}},"required":["routeName"],"type":"object"},"name":"wait_for_navigation"},{"annotations":{"idempotentHint":true},"description":"Writes the Metro CDP connection status script to ~/.claude/metro-mcp-statusline.sh. Does not modify settings.json — tell the user to add it to their status line themselves (e.g. ask Claude: \"/statusline add the script at ~/.claude/metro-mcp-statusline.sh\"). Only works with Claude Code.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"setup_statusline"},{"annotations":{"readOnlyHint":true},"description":"Auto-discover well-known global debugging objects (Redux stores, Apollo Client, Expo Router, React DevTools hook, etc.) available in the app runtime.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"detailed":{"default":false,"description":"Include top-level keys for each discovered global","type":"boolean"}},"type":"object"},"name":"list_debug_globals"},{"annotations":{"readOnlyHint":true},"description":"Inspect the smallest measured host component at screen coordinates. Uses awaited Fabric/Paper measurement and returns traversal completeness metadata.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"includeProps":{"default":true,"description":"Include component props in the result","type":"boolean"},"maxDepth":{"default":200,"maximum":600,"minimum":0,"type":"integer"},"maxNodes":{"default":1200,"maximum":5000,"minimum":1,"type":"integer"},"x":{"description":"X coordinate (points/dp)","type":"number"},"y":{"description":"Y coordinate (points/dp)","type":"number"}},"required":["x","y"],"type":"object"},"name":"inspect_at_point"},{"annotations":{"openWorldHint":true},"description":"Open the React Native DevTools debugger panel in Chrome. Connects through the CDP proxy so DevTools and the MCP can share the same Hermes connection.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"open":{"default":true,"description":"Attempt to open the browser automatically","type":"boolean"}},"type":"object"},"name":"open_devtools"},{"annotations":{"readOnlyHint":true},"description":"Get known app sandbox directory paths (documents, cache, temp, library). Returns absolute paths usable with list_directory and read_file.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"App bundle ID (iOS, e.g. com.example.app) or package name (Android). Required for iOS; used for Android private-directory resolution.","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"type":"object"},"name":"get_app_directories"},{"annotations":{"readOnlyHint":true},"description":"List files and directories in an app sandbox path. Call get_app_directories first to obtain the root path.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"App bundle ID (iOS) or package name (Android). Required when path is omitted; also used for Android run-as access.","type":"string"},"path":{"description":"Absolute directory path to list. Defaults to the app data container root (bundleId required).","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"},"recursive":{"default":false,"description":"Recursively list subdirectories (returns raw text)","type":"boolean"}},"type":"object"},"name":"list_directory"},{"annotations":{"readOnlyHint":true},"description":"Read the contents of a file from the app sandbox. Enforces a configurable size cap (default 50 KB, max 1 MB) to avoid flooding context.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"App package name (Android, for run-as access to private files)","type":"string"},"encoding":{"default":"utf8","description":"Output encoding. Use base64 for binary files (images, SQLite, etc.)","enum":["utf8","base64"],"type":"string"},"maxBytes":{"default":51200,"description":"Maximum bytes to read (default 50 KB, hard cap 1 MB)","type":"number"},"path":{"description":"Absolute path to the file","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["path"],"type":"object"},"name":"read_file"},{"annotations":{"readOnlyHint":true},"description":"Get file or directory metadata: size, modification date, and whether it is a directory.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"App package name (Android, for run-as)","type":"string"},"path":{"description":"Absolute path to the file or directory","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["path"],"type":"object"},"name":"get_file_info"},{"annotations":{"destructiveHint":true},"description":"Delete a file from the app sandbox. Requires confirm: true to prevent accidental deletion.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"bundleId":{"description":"App package name (Android, for run-as)","type":"string"},"confirm":{"description":"Must be set to true to confirm the deletion","type":"boolean"},"path":{"description":"Absolute path to the file to delete","type":"string"},"platform":{"default":"auto","enum":["ios","android","auto"],"type":"string"}},"required":["path","confirm"],"type":"object"},"name":"delete_file"},{"annotations":{"readOnlyHint":true},"description":"Return build-time and runtime flags for the running React Native app: __DEV__, platform, OS version, RN version, Hermes engine, New Architecture, and expo-application fields if available.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_build_info"},{"annotations":{"readOnlyHint":true},"description":"Return a filtered subset of process.env from the running app. Credential-like keys (SECRET, KEY, TOKEN, PASSWORD, etc.) are redacted by default. Use filter to search by key name substring.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"filter":{"description":"Substring to match against env var key names (case-insensitive)","type":"string"},"includeAll":{"default":false,"description":"When true, includes credential keys that are otherwise redacted","type":"boolean"}},"type":"object"},"name":"get_env_vars"},{"annotations":{"readOnlyHint":true},"description":"Return the full Platform.constants object from React Native, including OS-specific build details.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_platform_constants"},{"annotations":{"readOnlyHint":true},"description":"Return expo-constants manifest/expoConfig fields if the app uses Expo, otherwise null.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"},"name":"get_expo_config"}]}}}
