save_scene
Saves a re-packed Godot scene to disk, either overwriting the original or writing a save-as copy to a new path, and warns when content was dropped during the save.
Instructions
Re-pack and save a scene, optionally to another path (save-as). The mutation tools save by themselves: use this only for save-as via newPath, or to re-canonicalize a hand-edited .tscn. Overwrites silently. A newPath file gets no uid of its own. Returns: scenePath (loaded) and savedScenePath (written, confirmed on disk); warnings leads if the save dropped content. Errors while a runtime session is live on this project.
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>",
"scenePath": "<scenePath>"
},
"name": "save_scene"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newPath | No | Save to a different path (relative to project) instead of overwriting the original | |
| scenePath | Yes | Scene file path relative to the project | |
| projectPath | Yes | Path to the Godot project directory |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| warnings | No | ||
| scenePath | Yes | The scene that was loaded. | |
| savedScenePath | Yes | The file that was written. Equal to scenePath unless newPath was given. |