Change a resource or import settings
godot_resource_editEdit Godot .tres/.tscn resources and .import settings without opening the editor, using ordered operations, diff previews, and optional write plus headless reimport verification.
Instructions
Edit a .tres (or the sub_resources of a .tscn) and import settings, without the editor. .tres: set/unset properties on [resource] or a sub_resource (sub: its id), add_sub (type, optional id), remove_sub; names and types checked against Godot 4.7 (enums by name, resources as res:// or SubResource("id"), byte arrays as [0, 255] or base64:...); uids kept, only changed lines touched. Import (give the asset or its .import): get (key: type, default, choices), diff (options changed from default), set/unset an option (names checked against what the importer reads, enums by name: Forward, VRAM Compressed), per sub-resource with sub animations/, meshes/, materials/, nodes/PATH: (loop_mode, shadow meshes, external materials, cast shadow), importer (as: animation_library, scene, image, texture, keep), reimport. Ops run in order; one write. Without write it returns the diff. With write a .import is reimported headless and checked: Godot kept each value, output changed or not (an error result when Godot dropped a value or the import failed). godot_undo reverts.
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": {
"file": "<file>",
"ops": "<ops>"
},
"name": "godot_resource_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | changes or questions, applied in order | |
| file | Yes | res://path or a path: .tres, .tscn, an asset or its .import | |
| write | No | write (default false: diff only) | |
| reimport | No | after a .import write, reimport with Godot and verify (default true) |