Repository navigation
Editor tools
The agent sees these tools as godot.<name> (Claude Code shows them as mcp__godot__<name>). In the editor, What the agent can do (tools)… in the dock's ⋯ menu lists them by function, with what each one asks for in each mode (see Settings → Extensions).
Compact tool list (on by default, Settings → Advanced): every tool description takes context on every turn, so the tool list only carries the core (reading the project, the project map, diagnostics, scene editing, creating scenes and scripts, running the game, and restarting the editor) plus two more:
-
godot.methodslists the other tools, one line each (queryfilters;methodshows its description and parameters); -
godot.runcalls one:{"method": "tilemap_set_cells", "params": {…}}. It validates the parameters and asks the same permission as the tool itself.
The extra ones are API docs (class_info, search_api), project settings, export, bake, the Asset Store, files, resources, tilemaps, animation, the physics and tilemap validators, the live game and its debugger, the profiler, GDExtension, sessions and the second opinion. They're the same tools, with the same permission: only how the agent finds them changes. With the compact list, tools/list goes from about 91,000 characters to about 28,000 (measured with the 89 tools of 0.1.25). The setting applies from the next session.
The first column groups the tools by function. Each tool's permission group (the row of the matrix that decides whether it asks) is usually the one its name suggests; where it isn't, it's in parentheses. What the agent can do (tools)… shows it for every tool.
| Group | Tool | What it does |
|---|---|---|
| Read | project_info |
Godot version, editor binary, project name, main scene, autoloads, input actions, plugins, renderer. |
list_files |
Project files from the editor's filesystem with their resource type, and the size of PNG, JPEG and WebP images; glob filter. | |
dependencies |
What a file uses (forward: what its scene or resource loads, and a script's or shader's res://, uid:// and relative preload/load/extends paths) or who uses it (reverse: the files that name it by path, uid or relative path, the same scan delete_file uses; also for a folder), 1-3 levels deep, as a tree with line numbers. Through godot.methods with the compact tool list. |
|
read_function |
One GDScript function with its line numbers: signature, the ## comments and annotations above it and its body. By name (jump, or Inner.jump in an inner class) or by a line inside it (a frame of game_stack, an error), in a res:// script or a class_name. If the script has unsaved changes in the Script Editor it reads that text, and says so. Functions longer than 300 lines come in parts (from). GDScript only. |
|
find_symbols |
Where things are declared in the project's GDScript (class_name, inner classes, functions, signals, variables, constants, enums): exact names first, then names that start with the query, then names that contain it; kind keeps one kind. Returns path:line with the declaration. |
|
find_references |
Where a name is used: in GDScript code (each line says whether it's a call, .emit, .connect, a member access or the declaration; comments don't count), in strings that are exactly the name (connect("hit"), call_deferred("jump")), and in scenes and resources (saved signal connections, animation method tracks). It's lexical: a jump of two different classes comes together. |
|
find_in_files |
Searches the text of the project's files like the editor's Find in Files (the files the editor knows, with Godot's text extensions, .tscn and .tres included, plus the ones the project adds), as text or a regular expression, in a folder or only some extensions. Returns path:line: text. |
|
scene_tree |
A scene's tree: types, scripts, instanced scenes, groups and non-default properties. Without scene, the open scene with its unsaved changes. |
|
project_map |
The files most related to focus (paths, class_names, autoload or file names; default: the scene and script open in the editor), ranked, with each script's signals, public functions, exports and enums by line, each scene's nodes and saved connections, and where each script is used. Fits in max_tokens (2000 by default). |
|
get_node |
One node in detail: non-default properties, script, groups, saved signal connections and children. | |
editor_state |
Current and open scenes, selection, what the Inspector shows (a node, a resource file, or a sub-resource with the node or resource and property it comes from, such as a mesh's material or a StyleBox in a theme), open script with the caret line, and whether the game is running. | |
class_info |
The API of a class in the open editor's Godot version: inheritance, method signatures, properties with defaults, signals, constants, with descriptions. Engine classes, built-in types (Vector2…), @GlobalScope and project class_names. member gives one member's full docs. |
|
project_settings |
Settings under a prefix with value and default; without a prefix, the ones that differ from the default. | |
search_api |
Finds classes and members by name or capability ("raycast", "move toward"). | |
| Diagnostics | get_errors |
Errors and warnings from the editor and the last run. It returns a mark; pass it as since to see only new ones. |
| Diagnostics | get_output |
What the editor printed to the Output panel (editor scripts, @tool scripts and plugins: the progress of a bake, an import), with a mark like get_errors, the last lines and a contains filter. The game's prints come back from the run tools. |
validate_scripts |
Parses scripts in a separate process (the editor's binary) and returns errors by file and line, without running the game. In a C# project it also compiles with dotnet build. |
|
validate_physics, validate_tilemap
|
Read-only checks the agent runs after touching physics or maps: bodies and areas without a shape, shapes outside a body, collision masks that match no layer in the scene; TileMapLayers without a TileSet, cells the TileSet doesn't have, placed tiles without collision. | |
capture_editor_viewport |
An image of the 2D/3D viewport. To see the open scene from somewhere else without moving your view: from one of its cameras (camera), from a point looking at another (look_from, look_at; in 2D look_at and zoom), or up to 8 views around a point (angles). Those views are rendered off screen. |
|
| Edit scenes | add_nodes |
A whole subtree in one call and one undo step: nested nodes with type, properties, script, groups and instanced scenes. Nothing is created if one item is invalid. |
duplicate_node |
Copies a node with its children, script, groups and properties; next to the original or under another parent. | |
add_node, set_properties, remove_node, reparent_node, rename_node, connect_signal, instantiate_scene, open_scene, save_scene
|
Edits on open scenes, each one an undo step in the editor. | |
press_tool_button |
Presses a button that a @tool script added to the inspector with @export_tool_button (a bake, a generate), by its property name or its text, as if you clicked it. get_node lists a node's buttons. A button that awaits returns when it finishes; what it prints is in get_output. |
|
bake |
Bakes the open scene. navigation rebuilds NavigationRegion2D/3D from their geometry after the level changes, as one undo step. lightmaps (LightmapGI, needs Forward+ or Mobile) and occluders (OccluderInstance3D) press the editor's own Bake button, so the scene must be saved; the editor writes the .lmbake/.exr or .occ next to the scene and, as in the editor, they aren't undoable. |
|
| Edit files |
create_scene, attach_script
|
New scenes and scripts on disk (.gd, or .cs in Godot .NET, created as a partial class named like the file). create_scene also takes the root's script and properties (exported variables included), so a scene is never written by hand. |
| Project |
set_project_setting, set_input_action, remove_input_action, set_autoload, remove_autoload
|
Project settings, input actions (keys, mouse, joypad) and autoloads through the editor: each change is an undo step and saves project.godot. Editing project.godot by hand is rejected. |
export_project |
Exports with one of the project's export presets in a separate headless Godot (the editor's own binary; the agent only picks the preset, debug/release/pack and a file name) and reports errors, time and size. The file goes to a folder outside the project, or with output: "preset" to the preset's export path. debug and release need the export templates; pack writes only the .pck, a quick "does it export?" check. export_presets.cfg is never changed. |
|
| Asset Store |
asset_search, asset_details, addons_list (read), asset_install, plugin_enable
|
Search the Godot Asset Store for this Godot version, read an asset's page, license and releases, and list the project's plugins. asset_install downloads a release and writes only what goes in addons/ (unless include_other_files), never overwrites a file and enables its plugins; it's in its own permission group, Install from the Asset Store, which asks in every mode. plugin_enable turns a plugin on or off (not the harness). addons_list with check_updates finds newer releases of the project's plugins, and asset_install with update replaces the installed version. Paid assets are bought on the store website. |
| Tilemaps |
tileset_add_atlas, tileset_add_scenes, tilemap_set_cells, tilemap_paint_terrain, tilemap_clear (+ tilemap_get to read) |
On a TileMapLayer: a texture becomes an atlas (tiles for every non-transparent cell, optional full collision), tiles by cell or rectangle, terrains already set up in the TileSet, and an ASCII map with a legend to read it. Each change is an undo step. |
| Animation |
animation_create, animation_set_track, animation_remove, sprite_frames_set (+ animation_get to read) |
Animations of an AnimationPlayer with value tracks (keys converted to the property type) and method tracks; SpriteFrames of an AnimatedSprite2D/3D from images or a sprite sheet. Each change is an undo step. |
| Resources |
create_resource, set_resource_properties (+ get_resource to read) |
.tres files of a Godot class or a project class_name, with sub-resources inline ({"type": "StyleBoxFlat", …}) and typed arrays. Changes are an undo step and are saved. Writing a .tres by hand is rejected. |
| Files |
move_file, copy_file, delete_file
|
Move or rename keeping the uid and rewriting every res:// reference and the relative preload/load/extends paths of scripts; copy as a new resource (also from outside the project); delete only if nothing references it (to the trash). mv, cp and rm on project files are rejected. |
| Run | run_scene |
Runs a scene (with simulated inputs if you want) and returns the real errors. With continue_on_error, a script error doesn't stop the game in the debugger: it goes on and every error is listed (a breakpoint still stops it, and after 30 errors in one run it stops skipping them). Playtests and the One-shot evaluator use it; Build doesn't, because there it's better to stop at the first error. With film_fps (2 to 10 is plenty) it keeps small frames of the run to look back with game_frames, without fixing the game's frame rate the way record does. With monitors: true it measures performance during the whole run and adds the same summary as game_monitors at the end. The game ignores the gamepads connected to your computer, so a tilted or drifting stick doesn't move the player or the UI focus while the agent plays; the gamepad events the agent sends still work, and real_gamepads: true lets you play along with yours. With device it simulates another device for that run, without touching project.godot: a preset (phone, tablet, steam-deck, 1080p, 4k) or a window size, orientation, scale, touch (mouse clicks also arrive as touch events; phone and tablet turn it on) and locale, so the agent can check a HUD or translated texts in another aspect with capture_game_frame and game_ui. If the game would run embedded in the Game view, that run goes in its own window (the editor sets the size of an embedded game) and «Embed Game on Next Play» is left as it was. |
capture_game_frame |
A frame of the running game. Like capture_editor_viewport, it can show the world from one of the game's cameras (camera), from a point (look_from, look_at) or from up to 8 angles (angles) without moving the player's camera; those views are rendered off screen and leave out the game's UI layers. With several instances, instance picks one. |
|
profile_run |
Runs a scene like run_scene with Godot's script profiler on and lists the hottest GDScript functions by self time: path:line, calls, self and total ms per frame, share of script time, and whether the function is typed. The profiler slows every call (about 80–100 ns each), so compare functions with each other and measure before and after a change with the same tool. It reads the profiler through an internal editor API (Godot doesn't pass that data to plugins): in a Godot version that changes it, it answers with an error saying so. It doesn't start while a run_scene is in progress and always turns the profiler off at the end. |
|
stop_scene |
Stops it, with all its instances (instance stops only one). |
|
game_instance |
Several instances of the game at once, for multiplayer (a server and its clients) or parallel cases: run_scene with instances (up to 4 in total) starts more instances of the same scene, each with its own args (read with OS.get_cmdline_user_args(), e.g. --client 127.0.0.1:7000), optionally headless (a dedicated server) and with its own device and inputs. Instance 1 is the editor's game, as always; from instance 2 each one opens in its own window, placed side by side, with its own user:// folder so clients don't share saves (shared_user_dir turns that off). The game_* tools and capture_game_frame take instance; game_instance lists them, adds one while the game runs (a player joining) or stops one (for the others, a dropped connection). Stopping the editor's game stops them all, and closing the editor leaves none running. Errors from instance 2 on show as game#2, game#3… |
|
run_regressions |
Runs the saved playtest regressions without an agent turn, repeat times each (1 to 20, default 1; only those whose goal contains goal, if given), and says how many runs of each passed. A regression passes only if every run does; one that passes some runs is flaky, and the count is saved with it. The same as Run regressions in the findings panel (see Review). |
|
run_tests |
Runs the project's unit tests in a separate headless Godot process with this editor's binary, without the shell, and returns how many passed and each failure with its file:line and message (the rows in the chat open them). It uses the project check marked godot.run_tests (see Project checks), or GUT or gdUnit4 if they're installed. paths runs only some test scripts or folders and test only the tests whose name contains it; timeout_s defaults to 300. One run at a time, also across sessions. |
|
write_regressions_workflow (edit files) |
Writes a GitHub Actions workflow that runs the saved playtest regressions on every push and pull request; the same as CI workflow… in the findings panel (see Review). render: true runs them under Xvfb for checks that need the game drawn, repeat runs each one several times in CI (1 to 20) and fail_on_flaky makes a flaky regression fail the run too. |
|
| Live game |
game_tree, game_get (read), game_set, game_call, game_wait, game_input
|
With the game running (launched by run_scene, or a manual run with «Use the playtest autoload also when running the game manually»): the live node tree, read and change properties, call methods, wait until an expression is true or a signal is emitted, and send keys, actions, clicks (also double clicks, which reach a Control's _gui_input with double_click set) and joypad input, by time or by physics frame (the same sequence plays the same at any framerate). Changes are live only; the scene files stay as they were. Game errors raised meanwhile come back with the result. |
game_find, game_ui (read), game_ui_act
|
Find nodes by class, group or name. See the game's texts and controls with their ids, and use them with a real click: something on top of a control blocks it and comes back as an error. | |
game_pause, game_step
|
Pause the game and advance it exact physics frames with input: play turn by turn, even a fast game. | |
game_script |
A short GDScript that runs inside the game: many reads and inputs in one call, reacting in the same frame. It stops at its timeout, lets go of the keys and can't use files or start processes. | |
game_watch, game_frames (read) |
What changed in some nodes during a time window, with times, and the frames of the last seconds (with film_fps on run_scene). |
|
game_monitors (read) |
Godot's performance monitors, sampled every frame for a few seconds (2 by default, up to 30; optionally while playing steps): frame time (average, p95 and max), the engine's slowest process and physics frame of each second, draw calls, objects and primitives drawn, awake physics bodies and collision pairs, and nodes, orphan nodes, objects, resources and static and video memory at the start and end of the window (a count that keeps growing is a leak). It also lists the orphan nodes, grouped by name, class and script: nodes created and never added to the tree, or removed without free() (orphans: false leaves that list out). profile_run only measures GDScript; this shows a game that is slow because of rendering or physics, or that leaks nodes. |
|
game_breakpoint, game_stack (read), game_debug
|
The script debugger. game_breakpoint sets, clears and lists the agent's breakpoints in res://…gd scripts (action: set, clear, clear_all or list, with file and line, from 1 as in the script editor); they stay for the session's next runs and only reach games the agent launches (run_scene, regressions), not the ones you run with F5/F6. Your breakpoints from the script editor are kept apart: they also stop the game, and the agent can't clear them; if you and the agent mark the same line, it stays on until both remove it. When the game stops at a breakpoint or an error, run_scene says so, game_stack shows the call stack and the local and member variables of a frame (frame, 0 by default, is where it stopped; variables: false gives only the stack; values shortened: nodes with their path, collections with their size and first items), and game_debug continues or steps (action: continue, step into calls, next over them, out of the function) and says where it stopped next. When the session that set the breakpoints closes, they are removed, and if the game is stopped at one of them or after one of its steps, it goes on. game_stack needs the playtest autoload (run_scene); game_debug works on any stopped game. Only the main thread: a stop inside a Thread or a WorkerThreadPool task can only be handled from the Debugger panel. |
|
| GDExtension |
build_extension (shell), test_extension (run the game), install_extension
|
For projects with a native extension (godot-cpp with SCons or CMake, or gdext with Cargo). build_extension builds it and returns the compiler errors by file and line; it never loads the build into the open editor. test_extension tests it in a separate headless Godot, so a crash kills only that process, and returns the failed checks and, after a crash, the backtrace. install_extension brings the tested extension from its test project into the game as an addon, only if the tests pass. Nothing changes in the open editor: the files wait until the next restart, and restart_editor loads the new build, under the crash supervisor by default in these projects. Tested on Linux; Windows and macOS are not verified yet. |
| Restart |
restart_editor (project settings) |
For a change that only applies after a restart: a plugin enabled or disabled, a setting like the rendering method or the driver, the addon updated, a new GDExtension build. The agent has to give a reason, and the card shows it: «The agent wants to restart the editor: …». If another tab is in the middle of a turn, the card warns that the restart cuts it short, and a running One-shot pauses (Resume One-shot continues it). It saves the scenes, restarts, and reopens the dock's tabs with their sessions, modes and names, the separate copies included. The tab that asked continues with «The editor restarted (reason). Continue.»; the others come back without a message. You can do the same from ⋯ → Restart and resume. |
| Sessions |
sessions (read), session_send (messages to other sessions), request_mode
|
With several agent sessions open in the editor: list the others (name, mode, state, what each is working on, the files it's editing in its current turn, which one has the game running), and send one a short message (up to 4,000 characters). The message reaches that agent when its current turn ends, as data from the sender inside an untrusted envelope, not as instructions. Each message asks for permission (denied in One-shot), and a message to a session in a mode with more permissions than the sender's is always denied: see Modes and permissions. request_mode proposes switching the agent's own session to another mode, fixed or of the project; the user decides with a card, even in Auto (denied in One-shot): see The agent asks to switch modes. request_mode is in the Read group, but its card shows in every mode: the switch is always yours. |
| Second opinion |
ask_second_opinion (second opinion) |
Asks another agent, read only and without this conversation, to review the work: a question, the diff of the turn and files to look at. It goes through the Second opinion group (Ask in every mode, denied in One-shot) and the answer comes back inside an untrusted envelope. See Second opinion. |
A project can add its own tools in GDScript, for the operations of that game that would otherwise take the agent many calls (building a level from a table, filling an item database, setting up an enemy). Each .gd file in res://agent_tools/ (Change folder… in Extensions → Tools) is a tool named like the file: build_level.gd is godot.build_level.
@tool
extends "res://addons/godot_agent/api/agent_tool.gd"
func _description() -> String:
return "Places a row of crates in the open scene."
func _parameters() -> Dictionary:
return {"properties": {"count": {"type": "integer"}}, "required": ["count"]}
func _run(args: Dictionary, ctx) -> Variant:
var parent := EditorInterface.get_edited_scene_root()
ctx.undo_redo.create_action("Place crates")
for i in args.count:
var crate := preload("res://props/crate.tscn").instantiate()
crate.position = Vector2(i * 32, 0)
ctx.undo_redo.add_do_method(parent, "add_child", crate)
ctx.undo_redo.add_do_method(crate, "set_owner", parent)
ctx.undo_redo.add_do_reference(crate)
ctx.undo_redo.add_undo_method(parent, "remove_child", crate)
ctx.undo_redo.commit_action()
return "Placed %d crates." % args.count- The file starts with
@tool(it isn't inherited) and has noclass_name._parameters()is a JSON schema; the arguments are checked against it before_run._runcan useawaitand returns text, anImage, aDictionaryorArray(sent as JSON) orerror("why")for a failure the agent can fix.ctxhasundo_redo(changes made through it undo with Ctrl+Z),project_dirandnote(text)for the harness log. - The agent finds them with
godot.methods(marked[project tool]) and calls them withgodot.run; they don't take room in the tool list, also with the compact list off. A tool you edit is used from the next call, without restarting the session. -
Approval on each machine: a tool is code that runs inside the editor, and it comes with the project. It only loads on a machine where its code was approved: a notice names the tools that aren't, with Approve «name»… (and Approve all the tools…), and the dialog shows the code before you allow it. The approval covers the tool's file and every other
.gdin the folder (files starting with_and subfolders are helpers, not tools), so if any of them changes, also when the agent writes it, it asks again. An unapproved tool is never loaded, not even to read its description. The Tools tab of Extensions lists them under Project tools, with the ones not approved or with an error (a wrong file name, a missing@tool, a bad schema) and what to fix. - Permission: every call goes through the Project tools group: it asks in Build, One-shot and Auto, and is denied in Ask and Review, until you change it in the matrix. The card shows the tool's file and its arguments.
- A tool runs on the editor's main thread with everything a
@toolscript can do; there is no sandbox and no time limit (an endless loop freezes the editor). Scripts of the game that a tool loads from outside its folder are not part of the approval. - The export leaves the folder out (the tools extend a script of the addon, which isn't exported), and Add to the presets adds it to the presets' exclude filter.
- Undo: each scene edit is one step of the editor's undo. The tool card in the chat has ↶ undo while nobody has touched the scene afterwards.
- Open scenes: the agent is told to edit open scenes through these tools, never on disk.
-
Playtests:
run_sceneadds a temporary autoload that captures errors, frames and simulated input, and removes it as soon as the game starts. If the editor dies mid-playtest, the game closes on its own within a second or two, and the next start cleans up the autoload. The export never includes it. -
GDExtension: a build that crashes the editor would take your work with it, so new builds are tested outside the editor and only loaded on a restart. Under the crash supervisor (a headless Godot that opens the editor and watches it), a build that crashes the editor while starting is replaced by the last one that started fine and the editor reopens; the agent's session continues with a message that says what happened. If the editor is closed while an install from
install_extensionis waiting, the dock says so the next time it starts, with Restart to load it and Discard to drop it. -
Long calls: a call that takes longer than 2 seconds (a long
run_sceneorprofile_run,build_extension,test_extension, a C#validate_scripts, an Asset Store download, or any call waiting on its permission card) answers as an event stream with a progress notification every 10 seconds, when the client asks for progress (Claude Code and Google Antigravity do); for other clients it stays a plain answer. Without it, Claude Code stops waiting for an HTTP tool after 60 seconds with no response. Progress resets Claude Code's 5-minute idle limit, but not a total limit you set withMCP_TOOL_TIMEOUTor a servertimeout: keep that above 120 seconds, the longestrun_scene. A call still running after 30 minutes answers with an error (the tool may still be running in the editor). The stdio bridge passes each event on as it arrives, and if the editor closes the stream before the answer (the editor or the addon restarted), it answers that call with an error instead of leaving the client waiting. -
Tool hints: each tool tells the client whether it only reads (
readOnlyHint), can overwrite or delete (destructiveHint), is safe to repeat (idempotentHint) or reaches the internet (openWorldHint), from its permission group. Claude Code runs read-only calls in parallel. The harness still asks permission by group, whatever the client does with the hints. -
Project map:
project_mapfollows the links Godot uses, which grep doesn't see: scripts attached in scenes, instanced scenes, resources in.tscnand.tresfiles, saved signal connections,preload/loadpaths,class_nameand autoload names in code,extendsand groups. It ranks the files by how close they are to the focus, so a script that half the project uses (the player, a global state) doesn't crowd out the focus's own neighbours. Plugins inres://addons/are left out (the header says how many files) unless the focus is one of their files or classes. Autoloads saved asuid://are resolved. The first call indexes the project in the background (about 2.5 seconds for 750 scripts, 300 scenes and 350 resources); later calls reuse what didn't change and take about half a second. Its text comes in an untrusted envelope, because it includes names and signatures written in the project. -
Untrusted text: what the game prints, its errors, what the game tools read from the running game, the texts and node names of scenes and resources (
scene_tree,get_node,get_resource,animation_get,tilemap_get,editor_state, and the node names in errors and invalidate_physics/validate_tilemap) and what comes from the Asset Store (its pages, and the version and file paths an install reports) arrive inside<untrusted nonce="…">…</untrusted nonce="…">, with a new random nonce in each call. The agent is told to read that text as data and never follow it, so a game or an asset that writes "ignore your rules and…" can't give it orders. The text can't close the envelope early: it doesn't know the nonce, and any<untrustedtag it brings is escaped. The same goes for the@outputmention and the Fix with the agent prompt after a manual run. What you put in your own message goes as you wrote it, including the@paththat Point at something in the game… inserts: you see it before sending. This lowers the risk of prompt injection, mainly in Auto mode; it doesn't remove it. -
Loops: when the agent makes the same
godot.*call (or the same cycle of up to three calls) three times in a row in one turn and gets the same result every time, the result tells it so and asks it to change approach. What changes by itself between identical calls doesn't count as progress: the untrusted-text nonce, the game clock, the new-errors note. Each tab has its own count, which starts over at the end of every turn. In a playtest the game tools keep their own, stricter check (see Review); in One-shot it counts as a loop of the run. - Limits: Settings → Advanced sets the characters per result and the maximum image side; Settings → Permissions lists the extra folders outside the project that the agent may read and write.
-
Security: the server only listens on
127.0.0.1, requires a token that changes on every start (Regenerate token in Settings), and the token is masked wherever it could show: the log, the chat, the cards, the saved history.