update_autoload
Change an existing Godot autoload's script/scene path or singleton flag in project.godot without removing and re-adding it, keeping the autoload registered during the edit.
Instructions
Change an existing autoload's path or singleton flag. Pass autoloadPath, singleton or both; errors if neither is given. An omitted field keeps its current value. Use instead of remove_autoload plus add_autoload: one edit, no window where the autoload is missing. No Godot process is used. Returns: autoload { name, path, singleton } read back from project.godot. Errors if autoloadName is not registered, or if the result is a singleton named like a class_name a project script declares.
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": {
"projectPath": "<projectPath>",
"autoloadName": "<autoloadName>"
},
"name": "update_autoload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| singleton | No | New singleton flag | |
| projectPath | Yes | Path to the Godot project directory | |
| autoloadName | Yes | Name of the autoload to update | |
| autoloadPath | No | New path to the script or scene |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| autoload | Yes | ||
| warnings | No | Present only when the scan for a class_name clash could not cover every .gd file, or the script extends a chain that could not be followed to its end, so a clash may remain. |