filesystem_manage
Manage Godot project files: read/write text, reimport assets, list, move, delete, scan, search, and download assets via the editor's filesystem.
Instructions
Project filesystem access via the Godot editor's EditorFileSystem.
Ops:
• read_text(path)
Read a text file at a res:// path. Returns content, size,
line_count.
• write_text(path, content="")
Create or overwrite a text file. Updates the editor filesystem
entry for that one file (single-file update, not a full scan).
Newly-created files include data.cleanup.rm for transient
smoke tests; overwrite omits the field.
• reimport(paths)
Force-reimport the listed files via EditorFileSystem.update_file.
paths is a list of res:// paths.
Intended for imported assets such as textures, models, and audio.
Paths that are not imported resources (.gd scripts, .tscn,
hand-written .tres, or an asset the editor has not imported yet)
report under skipped_non_imported rather than reimported: their
filesystem entry is refreshed, but no import runs, so a success there is
not evidence that a script parsed or that diagnostics were produced. Use
script_patch/script_create to save a script and receive fresh
diagnostics, or scan for an asset awaiting its first import.
Returns reimported, skipped_non_imported, not_found and their
counts.
• list(path="res://", recursive=False, max_depth=1)
Browse the project's res:// tree (files, sizes, UIDs, and directories).
• delete(path)
Delete a file or directory from the project along with its .uid and .import sidecars.
• move(from_path, to_path)
Move or rename a file in the project, keeping sidecars consistent.
• scan()
Force a full EditorFileSystem.scan() and wait for it to settle.
This is the headless equivalent of the editor regaining window focus:
write_text/script_create register single files but do NOT
rebuild the global class_name table, so a freshly-created
class_name MyThing extends Resource is invisible to
resource_manage/type references until a scan runs. Call this once
after adding class_name scripts when the editor isn't focused.
Single-flight (awaits any in-progress scan rather than stacking another).
Returns scan_completed and global_classes_registered_delta.
• search(name="", type="", path="", offset=0, limit=100)
Find files by name, resource type, or path substring. At least one
filter must be set. Paginated.
• download_asset(url, path, extract=False, reimport=True)
Download an asset or zip archive from the internet directly into the
Godot project (res:// path). If extract=True or archive is zip, extracts
into target directory. Automatically triggers editor reimport and scan.
Returns: {url, path, size_bytes, is_archive, extracted_files, reimport_result}
• search_assets(query="", category="all", limit=20)
Search curated free/CC0 game assets (tilesets, audio, textures, UI, 3D models).
Categories: "all", "tileset", "audio", "texture", "ui".
Returns matching assets with direct download URLs ready for download_asset.
Canonical call shape: {"op": "<verb>", "params": {...}}. Flat op parameters are accepted as a compatibility alias when the client transmits them; op and session_id remain top-level.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| params | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||