ensure_connection
Verify or establish a healthy connection to a React Native app before running commands, after navigation, or when connection may be stale. Runs health checks and auto-reconnects if needed.
Instructions
Verify or establish a healthy connection to a React Native app. Use before running commands if connection may be stale, or after navigation/reload. This tool runs a health check and will auto-reconnect if needed.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ensure_connection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Metro port (default: auto-detect) | |
| healthCheck | No | Run health check to verify page context is responsive (default: true) | |
| forceRefresh | No | Force close existing connection and reconnect (default: false) |