Generate React Native code
generate_codeCompile a scene into a runnable React Native component. Pass inline scene JSON or a scene_id from your account. Output targets Reanimated v4 by default ("animated" targets the RN core Animated API, reduced feature set). Deterministic — no AI, no credits. Requires an API key on a paid plan.
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": "generate_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api | No | Default "reanimated" | |
| scene | No | The scene as a JSON object (preferred) or a JSON string. Call get_scene_format for the shape. | |
| scene_id | No | Generate from a saved scene instead of inline JSON | |
| relative_positioning | No | Emit flex-relative layout instead of absolute coordinates | |
| gesture_handler_version | No | react-native-gesture-handler major (default v2) |