js_eval
Execute JavaScript in a running React Native app through Metro CDP to inspect runtime state or test expressions; returns results and supports await for async code.
Instructions
Execute JavaScript in the running React Native app via Metro CDP. Returns the result. Supports await for async expressions.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"expression": "<expression>"
},
"name": "js_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | JavaScript expression or statement to evaluate |