editor_list_assets
Retrieve a list of all Unreal Engine asset paths to manage and organize project content efficiently.
Instructions
List all Unreal assets
Example output: [''/Game/Characters/Hero/BP_Hero'', ''/Game/Maps/TestMap'', ''/Game/Materials/M_Basic'']
Returns a Python list of asset paths.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server/index.ts:158-172 (registration)Registers the editor_list_assets tool with the MCP server, including description and the handler function that executes the tool by running the generated Python command.server.tool( "editor_list_assets", "List all Unreal assets\n\nExample output: [''/Game/Characters/Hero/BP_Hero'', ''/Game/Maps/TestMap'', ''/Game/Materials/M_Basic'']\n\nReturns a Python list of asset paths.", async () => { const result = await tryRunCommand(editorTools.UEListAssets()) return { content: [ { type: "text", text: result, }, ], } }, )
- server/editor/tools.ts:11-11 (helper)Helper function UEListAssets that reads and templates the Python script for listing assets.export const UEListAssets = () => Template(read("./scripts/ue_list_assets.py"))
- The core implementation logic in Python: lists all assets recursively in /Game folder using Unreal's EditorAssetLibrary and prints the list, which is executed remotely in the Unreal Editor.from typing import List import unreal def list_assets() -> List[str]: assets = unreal.EditorAssetLibrary.list_assets("/Game", recursive=True) return assets def main(): assets = list_assets() print(assets) if __name__ == "__main__": main()