# execute_script_on_file

Execute Python code on an existing .blend file in headless mode.

Agent View of the PolicyLayer registry record for `execute_script_on_file`. HTML page: https://policylayer.com/tools/dwgx-blender-copilot/execute-script-on-file

## Facts

- Tool: `execute_script_on_file`
- Server: Blender Copilot MCP Server (`dwgx/blender-copilot`) — https://policylayer.com/tools/dwgx-blender-copilot.md
- Homepage: https://github.com/dwgx/blender-copilot
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "execute_script_on_file",
    "arguments": {}
  }
}
```

## Why execute_script_on_file is rated High

This tool allows running arbitrary Python scripts within Blender's context on any .blend file. While not Financial or Destructive by itself (the destruction depends on script content), it is Execute because it triggers external operations (Blender headless execution) whose effects are determined by user-supplied code arguments.

From the tool's own definition: "Tool enables 'Execute Python code on an existing .blend file in headless mode.' Python execution on external files is a classic Execute pattern—the effects depend entirely on the arbitrary code argument."

## Use case

AI agents invoke execute_script_on_file to trigger actions in Blender Copilot MCP Server. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Blender Copilot MCP Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "execute_script_on_file": {
      "limits": [
        {
          "counter": "execute_script_on_file_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Blender Copilot MCP Server (306)

- `anim_clear_all` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/anim-clear-all.md
- `anim_delete_keyframe` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/anim-delete-keyframe.md
- `apply_modifier` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/apply-modifier.md
- `batch_delete` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/batch-delete.md
- `blender_new_file` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/blender-new-file.md
- `clear_animation` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/clear-animation.md
- `delete_object` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/delete-object.md
- `modifier_remove` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/modifier-remove.md
- `optimize_scene` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/optimize-scene.md
- `physics_remove` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/physics-remove.md
- `remove_constraint` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/remove-constraint.md
- `remove_modifier` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/remove-modifier.md
- `scene_cleanup` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/scene-cleanup.md
- `uv_remove_layer` — Destructive — https://policylayer.com/tools/dwgx-blender-copilot/uv-remove-layer.md
- `bake_ao` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/bake-ao.md
- `bake_physics` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/bake-physics.md
- `bake_textures` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/bake-textures.md
- `blender_launch` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/blender-launch.md
- `blender_open_file` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/blender-open-file.md
- `bmesh_operation` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/bmesh-operation.md
- `build_material_nodes` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/build-material-nodes.md
- `build_scene_from_json` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/build-scene-from-json.md
- `cloth_sim_model` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/cloth-sim-model.md
- `execute_code` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/execute-code.md
- `execute_script_headless` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/execute-script-headless.md
- `ft_sculpt_shape_key` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/ft-sculpt-shape-key.md
- `ft_setup_eye_tracking_full` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/ft-setup-eye-tracking-full.md
- `generate_hunyuan3d_model` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/generate-hunyuan3d-model.md
- `generate_hyper3d_model_via_images` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/generate-hyper3d-model-via-images.md
- `generate_hyper3d_model_via_text` — Execute — https://policylayer.com/tools/dwgx-blender-copilot/generate-hyper3d-model-via-text.md
- …and 276 more: https://policylayer.com/tools/dwgx-blender-copilot.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=dwgx-blender-copilot · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/dwgx-blender-copilot
