unity_asset_delete
Delete Unity assets from the project. Moves to OS trash by default; enable permanent deletion or recursive folder deletion as needed.
Instructions
Delete an asset — to the OS trash by default (NOT undoable via unity_undo_last). Deleting a FOLDER is recursive and refuses without recursive:true.
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": {
"path": "<path>"
},
"name": "unity_asset_delete"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Asset path relative to project root (e.g. 'Assets/Scripts/MyScript.cs') | |
| port | No | Unity instance port (from unity_select_instance). Always include it when multiple instances run. | |
| permanent | No | Hard-delete instead of OS trash. Default false. | |
| recursive | No | Required to delete a FOLDER and its contents. Default false refuses, reporting the asset count. |