Skip to main content
Glama

update_autoload

Idempotent

Change an existing Godot autoload's script/scene path or singleton flag in project.godot without removing and re-adding it, keeping the autoload registered during the edit.

Instructions

Change an existing autoload's path or singleton flag. Pass autoloadPath, singleton or both; errors if neither is given. An omitted field keeps its current value. Use instead of remove_autoload plus add_autoload: one edit, no window where the autoload is missing. No Godot process is used. Returns: autoload { name, path, singleton } read back from project.godot. Errors if autoloadName is not registered, or if the result is a singleton named like a class_name a project script declares.

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>",
      "autoloadName": "<autoloadName>"
    },
    "name": "update_autoload"
  }
}

Input Schema

NameRequiredDescriptionDefault
singletonNoNew singleton flag
projectPathYesPath to the Godot project directory
autoloadNameYesName of the autoload to update
autoloadPathNoNew path to the script or scene

Output Schema

NameRequiredDescriptionDefault
autoloadYes
warningsNoPresent only when the scan for a class_name clash could not cover every .gd file, or the script extends a chain that could not be followed to its end, so a clash may remain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.0.1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "autoload": {
      +      "properties": {
      +        "name": {
      +          "type": "string"
      +        },
      +        "path": {
      +          "description": "res:// path of the script or scene.",
      +          "type": "string"
      +        },
      +        "singleton": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "path",
      +        "singleton"
      +      ],
      +      "type": "object"
      +    },
      +    "warnings": {
      +      "description": "Present only when the scan for a class_name clash could not cover every .gd file, or the script extends a chain that could not be followed to its end, so a clash may remain.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "autoload"
      +  ],
      +  "type": "object"
      +}
  2. Addedv3.1.1
  3. Removedv3.0.0
  4. Addedv1.0.0

TDQS

A4.5/5.0
Behavior3/5

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

Annotations supply only idempotentHint, so the description carries most of the burden, and it does add real value: omitted fields keep current values, no Godot process is spawned, and both error conditions (unregistered name, singleton colliding with a declared class_name) are named. It stops short of describing rate limits or side effects on the running editor session, so it is good but not exhaustive.

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

Conciseness5/5

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

Front-loads the action, then the required-argument rule, then the sibling comparison, then side effects and errors. Every sentence carries distinct information; there is no filler or restatement of the name.

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

Completeness4/5

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

Covers purpose, preconditions, atomicity rationale, process implications, and failure modes, which is ample for a four-parameter mutation tool whose output schema already defines the returned autoload object. The description even summarizes the return payload, so little is missing beyond editor-session side effects.

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

Parameters5/5

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

Schema coverage is 100%, so the schema already defines all four parameters; the description nonetheless adds non-obvious meaning with "An omitted field keeps its current value," which tells the agent how partial updates behave. It also clarifies that autoloadName must already be registered, a constraint absent from the schema text.

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

Purpose5/5

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

States a specific verb and resource ("Change an existing autoload's path or singleton flag") and immediately names the exact fields that are editable. An agent can distinguish it from add_autoload/remove_autoload without opening any schema.

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

Usage Guidelines5/5

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

Explicitly says "Use instead of remove_autoload plus add_autoload" and gives the reason (one edit, no window where the autoload is missing). It also states the precondition that at least one of autoloadPath or singleton must be supplied, so the agent knows when the call would fail before making it.

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