See and drive the open Godot editor
godot_editorRead and control the open Godot editor: inspect scenes, select nodes, make undoable edits, play the game, and capture screenshots via local addon.
Instructions
Talks to the Godot editor the user has open, through the optional Godotwright addon (127.0.0.1 only, a new token every start). Everything else in Godotwright works without it. op install copies the addon into the project and enables it (the user then restarts the editor or enables it under Project Settings > Plugins); op uninstall removes it; op addon says whether it is installed and running; op ops lists every op with its arguments. Reading: status (open scenes, which is current, unsaved changes, whether the game runs), selection, tree (the edited scene as the editor has it now, unsaved changes included), inspect (a node's stored properties), errors (errors and warnings the editor logged, Godot 4.5+; pass since to get only new ones), is_scanning. Acting: open_scene, select, edit_node, save_scene, save_all, reload_scene (after you changed a scene file, so the editor shows it; refuses unsaved editor changes unless discard: true), close_scene, filesystem_scan, reimport, play (main, current or a scene), stop, screenshot (editor, viewport_2d or viewport_3d; a PNG under .godot/godotwright/). Editing the open scene, each as one undoable editor action (Ctrl+Z in the editor takes it back; the scene stays unsaved until save_scene): set_property (path, property, value as Variant text such as "Vector2(1, 2)"), add_node (a type or a scene instance under parent, with name and properties), remove_node, rename_node; each answer names the undo step. For edits to files that are not open, or many at once, use godot_scene_edit, then reload_scene. Errors of a game started from the editor are not in op errors: godot_logs reads them from the game's log file (play returns its cursor). Ops: status, open_scene, save_scene, save_all, reload_scene, close_scene, selection, select, edit_node, inspect, tree, play, stop, screenshot, filesystem_scan, reimport, is_scanning, errors, set_property, add_node, remove_node, rename_node.
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": {
"op": "<op>"
},
"name": "godot_editor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | install, uninstall, addon, ops, or an editor op such as status, tree, errors, reload_scene, play, screenshot | |
| args | No | arguments of the editor op, e.g. {"path": "res://main.tscn"} or {"since": 12} | |
| path | No | project folder, or a file or folder inside it (relative to the server's folder; default: the current project) | |
| user_dir | No | play: the folder user:// is, as you pass it to godot_logs (another user, WSL, a container, a Flatpak), so the log cursor play returns is taken there | |
| timeout_seconds | No | how long to wait for the editor (default 10) |