babylonjs_scene_evaluate
Run custom JavaScript functions on a live BabylonJS scene to query or manipulate objects, with results serialized to JSON.
Instructions
Execute a JavaScript function against the BabylonJS scene. The function receives (scene, engine, BABYLON) as arguments. Return values are serialized to JSON. Use this for custom queries or operations not covered by other tools.
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": {
"function": "<function>"
},
"name": "babylonjs_scene_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| function | Yes | JavaScript function body. The function receives (scene, engine, BABYLON) as arguments. Example: '(scene) => scene.meshes.map(m => ({name: m.name, pos: m.position.asArray()}))' |