import bpy
scene=bpy.context.scene
print('state objects',len(bpy.data.objects),'cams',len(bpy.data.cameras),'lights',len(bpy.data.lights))
scene.render.engine='BLENDER_EEVEE'
scene.render.resolution_x=640; scene.render.resolution_y=640; scene.render.resolution_percentage=100
scene.render.image_settings.file_format='PNG'; scene.render.film_transparent=False
scene.render.filepath='/tmp/classical_bust_preview.png'
scene.world.color=(0.025,0.03,0.035)
if scene.world.use_nodes:
    bg=scene.world.node_tree.nodes.get('Background')
    if bg:
        bg.inputs['Color'].default_value=(0.025,0.030,0.038,1)
        bg.inputs['Strength'].default_value=.22
try:
    scene.view_settings.look='AgX - Medium High Contrast'
except: pass
scene.view_settings.exposure=0.0; scene.view_settings.gamma=1.0
# pick active head if it exists
head=bpy.data.objects.get('Head • idealized antique cranium')
if head:
    bpy.ops.object.select_all(action='DESELECT'); head.select_set(True); bpy.context.view_layer.objects.active=head
bpy.ops.wm.save_as_mainfile(filepath='/tmp/classical_head_bust.blend')
bpy.ops.render.render(write_still=True)
print('done render',scene.render.filepath)
result={'objects':len(bpy.data.objects),'meshes':len(bpy.data.meshes),'materials':len(bpy.data.materials),'preview':'/tmp/classical_bust_preview.png','blend':'/tmp/classical_head_bust.blend'}


Traceback (most recent call last):
  File "<repo>\.runner\blender-mcp-v1.0.0\addon\mcp_to_blender_server.py", line 230, in _execute_code
    exec(code, namespace)
    ~~~~^^^^^^^^^^^^^^^^^
  File "<string>", line 22, in <module>
RuntimeError: Error: Cannot open file <repo>\apps\console\tmp\classical_head_bust.blend@ for writing: No such file or directory

state objects 90 cams 2 lights 5
Error: Cannot open file <repo>\apps\console\tmp\classical_head_bust.blend@ for writing: No such file or directory