Skip to main content
Glama

godot_update_project_settings

Modify Godot project configuration values directly through the engine. Update settings like window size, application name, or display properties by specifying paths and values, then save changes to the project file.

Instructions

Update one or more ProjectSettings values and save them back to the Godot project through Godot itself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYesPath to the Godot project directory or its project.godot file.
settingsYesList of setting updates. Each item must include `name` plus exactly one of `value` or `value_godot`.
godot_executableNoOptional explicit path to the Godot executable or .app bundle.

Implementation Reference

  • Implementation of the update_project_settings logic in the GodotController class.
    def update_project_settings(
        self,
        project_path: str,
        settings: list[dict[str, Any]],
        godot_executable: str | None = None,
    ) -> dict[str, Any]:
        project_dir = ensure_project_path(project_path)
        executable, version = resolve_godot_executable(godot_executable)
    
        if not settings:
            raise GodotError("`settings` must contain at least one setting update.")
    
        normalized_settings: list[dict[str, Any]] = []
        for index, item in enumerate(settings):
            if not isinstance(item, dict):
                raise GodotError(f"`settings[{index}]` must be an object.")
    
            setting_name = str(item.get("name", "")).strip()
            if not setting_name:
                raise GodotError(f"`settings[{index}].name` is required.")
    
            has_value = "value" in item
            has_value_godot = str(item.get("value_godot", "")).strip() != ""
            if has_value == has_value_godot:
                raise GodotError(
                    f"`settings[{index}]` must include exactly one of `value` or `value_godot`."
                )
    
            normalized_item = {"name": setting_name}
            if has_value_godot:
                normalized_item["value_godot"] = str(item["value_godot"])
            else:
                normalized_item["value"] = item["value"]
            normalized_settings.append(normalized_item)
    
        try:
            with tempfile.NamedTemporaryFile(
                mode="w",
                encoding="utf-8",
                suffix="-godot-project-settings.json",
                delete=False,
            ) as handle:
                json.dump(normalized_settings, handle, ensure_ascii=False)
                updates_path = handle.name
        except TypeError as exc:
            raise GodotError("`settings` contains a value that could not be serialized to JSON.") from exc
    
        try:
            output = _run_godot_script(
                executable=executable,
                project_dir=project_dir,
                script_name="update_project_settings.gd",
                user_args=["--updates-path", updates_path],
            )
        finally:
            Path(updates_path).unlink(missing_ok=True)
    
        parsed = _parse_script_json_output(output, "update_project_settings.gd")
        updated_settings = parsed.get("updated_settings")
        if not isinstance(updated_settings, list):
            raise GodotError("Project settings update did not return a settings list.")
    
        return {
            "project_path": str(project_dir),
            "project_file": str(project_dir / "project.godot"),
            "updated_count": len(updated_settings),
            "updated_settings": updated_settings,
            "godot_executable": str(executable),
            "godot_version": version,
        }
  • Registration of the godot_update_project_settings tool within the GodotMcpServer class.
        name="godot_update_project_settings",
        description="Update one or more ProjectSettings values and save them back to the Godot project through Godot itself.",
        input_schema={
            "type": "object",
            "properties": {
                "project_path": {
                    "type": "string",
                    "description": "Path to the Godot project directory or its project.godot file.",
                },
                "settings": {
                    "type": "array",
                    "description": "List of setting updates. Each item must include `name` plus exactly one of `value` or `value_godot`.",
                    "items": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string",
                                "description": "Project setting path, such as application/config/name or display/window/size/viewport_width.",
                            },
                            "value": {
                                "description": "JSON-compatible value to save into ProjectSettings.",
                            },
                            "value_godot": {
                                "type": "string",
                                "description": "Optional raw Godot expression, such as Vector2i(1280, 720) or Color(1, 0, 0).",
                            },
                        },
                        "required": ["name"],
                        "additionalProperties": False,
                    },
                    "minItems": 1,
                },
                "godot_executable": {
                    "type": "string",
                    "description": "Optional explicit path to the Godot executable or .app bundle.",
                },
            },
            "required": ["project_path", "settings"],
            "additionalProperties": False,
        },
        handler=lambda args: self.controller.update_project_settings(
            project_path=args["project_path"],
            settings=args["settings"],
            godot_executable=args.get("godot_executable"),
        ),
    ),
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'save them back' indicating a write operation, but lacks critical details: whether this requires specific permissions, if changes are immediate or require project restart, potential side effects on existing settings, or error handling. For a mutation tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action. Every word contributes to understanding the tool's purpose without redundancy. However, it could be slightly more structured by separating purpose from constraints.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't address return values, error conditions, or the impact of saving changes (e.g., whether the project file is overwritten). Given the complexity of modifying ProjectSettings, more behavioral context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain ProjectSettings hierarchy or provide value format examples). Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('update one or more ProjectSettings values and save them back') and identifies the resource ('Godot project through Godot itself'). It distinguishes from siblings like godot_update_node_transform (which modifies nodes) by focusing on ProjectSettings, but doesn't explicitly contrast with all sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether the project must be closed), compare with manual editing, or indicate scenarios where other tools like godot_create_project might be more appropriate. Usage context is implied but not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MhrnMhrn/godot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server