Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FLAX_BRIDGENoBridge mode placeholder; defaults to `auto`. It is parsed but does not currently change connection behaviorauto
FLAX_TOOLSETSNoComma-separated selection from `project`, `content`, `scene`, `build`, `logs`, `editor`, `events`, `jobs`, and `game`; `server` is always included. Omit for all toolsets
FLAX_LOG_LEVELNoMinimum server log level written to stderr; defaults to `Warning`Warning
FLAX_READ_ONLYNo`true`, `1`, or `yes` removes all tools that can alter files or editor state
FLAX_ENGINE_PATHNoFlax Engine root. When omitted, uses the Flax Launcher's `%APPDATA%/Flax/Versions.txt` registrations
FLAX_PROJECT_PATHYesPath to a `.flaxproj`, or a directory containing exactly one top-level `.flaxproj`
FLAX_EDITOR_CONFIGNoEditor binary configuration: `Development` (default), `Debug`, or `Release`Development
FLAX_ALLOW_CODE_EXECUTIONNoEnables `editor_execute_csharp` and `editor_invoke_method` only when true and `FLAX_READ_ONLY` is false

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server inspects a Flax Engine project at '/flax/project'. It exposes 57 tools.

How to use these tools well:

  • project_info reads the .flaxproj file directly: name, version, build targets, referenced projects (including the engine and any plugins), and the default scene.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
server_infoA

Returns the FlaxMcp server name and version.

flax_statusA

Reports whether the configured project has a reachable Flax Editor bridge and returns its session metadata.

project_infoA

Reads the .flaxproj file: name, version, targets, references, and default scene.

project_targetsB

Parses the GameTarget/EditorTarget *.Build.cs files referenced from the .flaxproj: target class names and referenced modules.

project_settingsA

Reads Content/.json and Content/Settings/.json settings assets (Game, Graphics, Input, Physics, ...) as structured JSON.

content_searchB

Searches the Content/ index by partial path match, TypeName, and/or extension. Id/TypeName are null for files whose format isn't recognized or a .flax header that doesn't match the reverse-engineered layout (verified against Flax 1.12 and 1.13).

content_asset_infoB

Returns metadata (Id, TypeName, RelativePath, Extension) for the content asset with the given GUID.

content_resolve_guidB

Resolves a content asset GUID to its path relative to Content/.

content_create_materialA

Creates a surface Material asset through the live Flax Editor and saves it. relativePath is relative to Content/ and ends in .flax. The tool does not overwrite: it fails when an asset exists at that path. It creates missing folders. The editor does not record an Undo step. Texture ids are asset GUIDs of 32 hex digits: get them from content_search. normalTextureId must be a texture that is imported as a normal map. For glass, water or film, use content_create_material_transparent. For a variant of an existing material, use content_create_material_instance.

content_material_detailsA

Returns typed values, texture references, UV tiling, and exposed parameters for a live surface Material asset.

content_create_material_instanceA

Creates a MaterialInstance asset from a live surface material and applies validated parameter overrides atomically.

content_set_material_instance_parameterB

Sets one validated parameter override on an existing MaterialInstance and saves the asset.

content_create_material_transparentA

Creates a transparent surface Material (blend mode Transparent, Lit) through the live Flax Editor, for glass, water or film. Opacity 0 is fully clear. Refraction is the material's Refraction input: 1 bends nothing. Flax applies it as a strong screen distortion: 1.03 already shrinks objects behind a bottle-sized surface to about 40 % of their width, as through thick glass. Use 1.0 for thin glass with something inside (a bottle with liquid), and values above 1 only for a lens effect. The material traces screen-space reflections. Its four values are public parameters named BaseColor, Opacity, Roughness and Refraction, so content_create_material_instance makes variants (a tint, frosted or thicker glass, water) of one material. Paths are relative to Content/ and must end in .flax. No asset may exist at the path.

scene_listB

Lists scenes (.scene) and prefabs (.prefab) in the project's Content/ directory.

scene_outlineA

Reads the actor tree of a saved .scene or .prefab file on disk. The tree comes from the ParentID links, not from the file order. The scripts of an actor are in its Scripts list, not in its child nodes. Truncated is true when the tool reached the depth or node limit. The tool does not see unsaved changes. For the live tree in the running editor, use editor_scene_graph.

scene_find_actorA

Searches the actors of a saved .scene or .prefab file on disk. Name matches a part of the actor name, TypeName matches the full type name, and both ignore case. The tool does not need the editor and does not see unsaved changes. It returns the first 100 matches. For the scenes in the running editor, use editor_find_actors.

build_generate_projectsA

Runs FlaxEditor.exe -genprojectfiles to regenerate IDE project/solution files.

build_compile_scriptsA

Compiles the game scripts in a separate headless Flax Editor process, with a time limit of 2 minutes. Returns structured compiler errors (file, line, code, message) from the engine log. The tool fails when a Flax Editor is open on the project. With the editor open, use build_check_scripts to find errors, or editor_compile to compile and reload.

build_clear_cacheB

Runs FlaxEditor.exe -clearcache, and optionally -clearcooker too, to clear build caches.

build_check_scriptsA

Compiles the project's script modules, and those of the projects it references, outside the editor into a scratch folder. It uses the compiler arguments that Flax.Build last used and the current files of the modules. Returns passed, failed or unavailable (never built: Reason tells why), with structured errors and warnings (file, line, column, code) and the outcome of each module. It works while the editor is open, also during play mode. It changes nothing in the project. Use it to find compile errors fast. It does not load the change into the editor: for that, use editor_compile.

build_gameA

Starts a game build (-build ., e.g. preset 'Development', target 'Windows') in the background and returns its job at once -- a real build can take minutes. Follow it with job_status or job_wait; the job's result is the build outcome.

logs_tailA

Returns the last N lines (default 200) of the project's most recent Logs/*.txt file, without running the editor.

logs_errorsA

Extracts lines tagged [Error] or [Warning] from the project's most recent Logs/*.txt file, without running the editor.

editor_scene_graphA

Returns the live actor tree of every scene that is open in the running Flax Editor, with the unsaved changes. Truncated is true when the tree has more than 500 nodes or 32 levels. For a saved .scene or .prefab file without the editor, use scene_outline. To find actors by name or type, use editor_find_actors.

editor_get_selectionA

Returns the actors currently selected in the live Flax Editor.

editor_set_selectionA

Replaces the live Flax Editor actor selection with the actors identified by GUID. Pass an empty list to clear the selection.

editor_actor_detailsA

Returns live identity, hierarchy, activation, layer, tags, world/local transforms, and scripts for one actor loaded in the Flax Editor.

editor_modify_actorA

Replaces an existing live actor's world transform and returns its updated details. Use editor_actor_details first to preserve transform values that should not change.

editor_create_actorB

Creates an allowlisted EmptyActor or StaticModel in a loaded scene and returns its live details.

editor_duplicate_actorA

Duplicates a loaded actor, with its children and scripts, into a loaded scene or under a loaded parent actor. Returns the live details of the duplicate. Set exactly one of sceneId and parentId, and set the other to null. name is the name of the duplicate. Its children keep their names. translation, orientation and scale set the world transform of the duplicate. The source actor does not change. The editor records an Undo step. The scene stays unsaved until editor_save. To make a new actor of a type, use editor_create_actor. To move an actor to a different parent, use editor_reparent_actor.

editor_rename_actorA

Renames a loaded actor through the editor Undo/Redo history and returns its updated details.

editor_reparent_actorA

Moves a loaded actor to another loaded parent or to a loaded scene root through Undo/Redo history. Set exactly one of sceneId or parentId and explicitly choose whether to preserve the world transform.

editor_delete_actorA

Deletes a loaded actor through the editor Undo/Redo history. Set deleteDescendants to true to explicitly delete its complete hierarchy; false rejects actors with children.

editor_static_model_detailsA

Returns the assigned model reference and live actor details for a loaded StaticModel actor.

editor_set_static_modelA

Assigns an existing FlaxEngine.Model asset to a loaded StaticModel actor through Undo/Redo history. The bridge validates that modelId resolves to a compatible model before changing the scene.

editor_set_static_model_materialA

Assigns an existing FlaxEngine.MaterialBase asset to one slot of a loaded StaticModel through Undo/Redo history. The bridge validates the actor, slot, and material before changing the scene.

editor_box_collider_detailsA

Returns the local size, center, trigger mode, and actor details for a loaded BoxCollider.

editor_create_box_colliderB

Creates a BoxCollider under a loaded parent actor and returns its effective properties.

editor_set_box_colliderB

Updates a loaded BoxCollider's local size, center, and trigger mode through Undo/Redo history.

editor_saveA

Saves every open scene (including changes made through the API, which the editor does not mark as modified) and all modified content assets in the live Flax Editor. Refused during play mode: a save then would write the play-time scene, with every actor scripts created at run time.

editor_play_modeA

Controls play mode in the live Flax Editor. Action must be start, stop, pause, or resume. Returns when the editor has reached the requested state (up to 30 seconds, so a heavy scene can load).

editor_screenshotA

Captures the Scene viewport of the running Flax Editor to a PNG file. The Scene tab must be visible: the capture fails when another tab covers it. The output folder must exist. The capture is not available in headless mode. To render from a camera without the Scene tab, use editor_camera_screenshot.

editor_compileA

Compiles the project's scripts and returns when the editor has reloaded and settled. First, the tool compiles the scripts outside the editor with the compiler arguments that Flax.Build last used (build_check_scripts). Errors come back at once, structured (file, line, column, code), and the editor does not change. After a clean check, the tool stops play mode and the editor compiles. The outcome is reloaded, unchanged or failed (build tool lines in BuildErrors). Check tells how the check went: passed, failed, or unavailable with the reason. Use this tool when the editor is open. With no editor, use build_compile_scripts. To find errors without a change in the editor, use build_check_scripts.

editor_open_sceneA

Opens a scene in the live Flax Editor and returns when it has loaded. The path is absolute or relative to the project's Content folder (for example Scenes/Main.scene). Refused during play mode.

editor_host_statusA

Returns the state of the bridge host, the pipe server that outlives script reloads: its version and start time, the attached plugin generation, attach and detach counts, the editor's memory and garbage collections, and how many old plugin load contexts are still alive (reloads that leak). collect=true runs a full garbage collection first so that count is a measurement; it takes long on a large heap.

editor_find_actorsA

Finds actors in the scenes that are open in the running editor (the play-time scene during play), with the unsaved changes. The filters are name, actor type and script type. All are optional, and they combine. Types match by full or short name. Returns id, name, type, path from the scene and the types of the scripts. Truncated is true when more than the limit matched. For a saved .scene or .prefab file without the editor, use scene_find_actor. For the full tree, use editor_scene_graph.

editor_get_memberA

Reads a field or property of an actor, or of one of its scripts, by a dotted path (e.g. Clock.Steps). Private members count. Unknown names list the members that exist.

editor_set_memberA

Writes a field or property of an actor or of one of its scripts by a dotted path; a struct on the way is written back. The value is JSON in the member's shape (a number, true, "text", an enum name, {"X":1,"Y":2,"Z":3}). In edit mode it goes through the editor's undo and marks the scene edited (editor_save keeps it); in play mode it lasts until play ends. Returns the value read back.

editor_add_scriptA

Adds a script of a type to an actor (nothing when it has one already) and, in edit mode, marks the scene edited so editor_save keeps it. The type is resolved by full or short name in the loaded assemblies.

editor_camera_screenshotA

Renders a camera into its own render target and saves a PNG. It does not read an editor window, so it works with the editor covered, small or minimised, in play mode and in edit mode. Camera: the given Camera actor. Without one: the main camera in play mode, else the editor viewport's view. The picture shows the 3D scene with the game's post effects, without editor or screen-space UI. Not available in headless mode. Replaces an existing file. Read the PNG to see it.

game_commandsA

Lists the commands the game registered with the bridge (FlaxMcpBridge.GameCommands.Register): name, description and the type that registered it. Game scripts usually register while enabled, so the list in play mode can differ from the one in edit mode.

game_commandA

Runs a registered game command on the editor's main thread and returns its text result. Errors: unknown_command (lists the registered names), command_failed (the handler's exception type and message).

editor_eventsA

Returns the editor's recorded events after a sequence number, oldest first. Kinds: log (managed log lines only; the engine's native lines such as compiler output stay in the log file), exception, compile_begin, compile_succeeded, compile_failed, reload_begin, reload_end, play_begin, play_end, scene_loaded, scene_load_error, scene_saved, scene_save_error, scene_unloaded. The bridge host keeps the last 4096 events across script reloads; Truncated is true when some after sinceSeq were overwritten. A new HostStartedUtc means the editor restarted and the sequence began again.

editor_wait_forA

Waits for the first editor event of a kind (see editor_events), optionally with a text, and returns it. Without sinceSeq it waits for an event after the call; with it, an event already recorded after that number counts. A timeout is a result (TimedOut true), not an error. Example: start play with editor_play_mode, then editor_wait_for kind=log textContains="[Test]" to read a game's answer.

editor_job_startA

Starts a long editor operation as a job and returns at once. The kinds are compile (compile the scripts and wait until the editor has reloaded and settled), play_start, play_stop, play_pause, play_resume and open_scene (path). Editor jobs run one at a time. A second job while one runs fails with job_conflict, which names the running job. Follow the job with job_wait or job_status. Its result is the result of editor_compile, editor_play_mode or editor_open_scene. Use this tool instead of those tools when the client must not wait, or when it does other work and then checks the job.

job_statusA

Returns a job's state: running, succeeded (with its result), failed or canceled (with the reason), and its latest progress message. Jobs come from editor_job_start, build_game, and the editor tools that run as jobs.

job_waitA

Waits for a job to end, up to the timeout, sending its progress messages as progress notifications, and returns its state. A timeout is a result (Status running), not an error.

Prompts

Interactive templates invoked by user choice

NameDescription
diagnose_build_failureCompiles Flax game scripts and diagnoses the failure using structured diagnostics and the engine log.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 57 tools

Disambiguation3/5

Descriptions go to unusual lengths to route callers between the disk-based (scene_outline, scene_find_actor, content_search) and live-editor (editor_scene_graph, editor_find_actors) variants, which prevents most misselection. However, the set has genuine redundancy: four compile paths (build_check_scripts, build_compile_scripts, editor_compile, editor_job_start kind=compile), play mode via both editor_play_mode and editor_job_start, and job wrappers that shadow the direct tools. An agent must read long descriptions to pick correctly in several places.

Naming Consistency3/5

Names are grouped by domain prefix (content_, scene_, editor_, build_, logs_, job_, project_) and all use snake_case, which is readable. But the verb/noun convention is mixed within prefixes: editor_get_member/editor_set_member/editor_set_selection use verbs while editor_actor_details/editor_scene_graph/editor_box_collider_details use nouns, and a few outliers (server_info, flax_status, job_wait vs editor_wait_for) break the pattern.

Tool Count2/5

At 57 tools this is far past the comfortable 3-15 band and well into 25+ territory, even for a broad engine bridge spanning content, scenes, actors, build, logs, jobs, and screenshots. Several tools are near-duplicates (four compile routes, two screenshot tools, job wrappers around direct tools) and could be folded into parameterized tools to shrink the surface considerably.

Completeness4/5

Coverage is deep: content asset resolution/search/material creation, disk and live scene inspection, a solid actor lifecycle (create, duplicate, rename, reparent, delete, transform, scripts, members, static model, box collider), build/job/log infrastructure, screenshots, and event waiting. Notable gaps remain — no asset delete/move/rename, no scene or prefab creation, only EmptyActor/StaticModel/BoxCollider creatable — but none break core workflows.

Maintenance

ActivityMaintained
ResponsivenessLimited data