Skip to main content
Glama

batch_scene_operations

Destructive

Batch multiple scene mutations (add nodes, sprites, property updates, saves) into one Godot process to avoid per-call startup overhead and save once at the end.

Instructions

Use this instead of chaining add_node / load_sprite / save_scene calls when you have multiple mutations on the same or related scenes - runs in one Godot process (~3s startup avoided per call) and shares an in-memory scene cache, saving once at the end. Each item picks its own sub-operation (add_node, load_sprite, set_node_properties, save) and supplies its own params; add_node items accept the same promoted spatial params (position, rotation, scale, visible, modulate) as the standalone tool; set_node_properties items accept the same per-update params (nodePath, property, value) and per-operation scenePath and abortOnError as the standalone tool; abortOnError stops on first failure (default false continues). Returns: results[] in input order, each tagged with operation and scenePath plus success or error. Errors while a Godot runtime session is active on this project; stop_project (or detach_project) clears it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationsYesOrdered list of scene operations. Each item has its own operation and scenePath.
projectPathYesPath to the Godot project directory
abortOnErrorNoStop processing on first error (default: false)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.8.0
    • changedInput schema / properties / operations / items / properties / updates / items / properties / value / description
      Previous value: -"New value. Vector2/Vector3/Color auto-convert from {\"x\",\"y\"} / {\"x\",\"y\",\"z\"} / {\"r\",\"g\",\"b\",\"a\"} objects; primitives pass through"New value: +"New value. Vector2/Vector3/Color auto-convert from {\"x\",\"y\"} / {\"x\",\"y\",\"z\"} / {\"r\",\"g\",\"b\",\"a\"} objects; primitives pass through. For Packed*Array properties, a plain array applies the same conversions element-wise (e.g. [{\"x\":10,\"y\":20}, ...] for Polygon2D.polygon); an element that cannot represent the packed element type errors instead of silently storing zeros."
  2. Changed5 schema fields changedv3.6.0
    • changedInput schema / properties / operations / items / properties / modulate / description
      Previous value: -"[add_node] Color modulation — shorthand for properties.modulate"New value: +"[add_node] Color modulation - shorthand for properties.modulate"
    • changedInput schema / properties / operations / items / properties / position / description
      Previous value: -"[add_node] Position — {\"x\",\"y\"} for 2D nodes, {\"x\",\"y\",\"z\"} for 3D. Shorthand for properties.position"New value: +"[add_node] Position - {\"x\",\"y\"} for 2D nodes, {\"x\",\"y\",\"z\"} for 3D. Shorthand for properties.position"
    • changedInput schema / properties / operations / items / properties / rotation / description
      Previous value: -"[add_node] Rotation in radians — shorthand for properties.rotation"New value: +"[add_node] Rotation in radians - shorthand for properties.rotation"
    • changedInput schema / properties / operations / items / properties / scale / description
      Previous value: -"[add_node] Vector2 scale — shorthand for properties.scale"New value: +"[add_node] Vector2 scale - shorthand for properties.scale"
    • changedInput schema / properties / operations / items / properties / visible / description
      Previous value: -"[add_node] Visibility — shorthand for properties.visible"New value: +"[add_node] Visibility - shorthand for properties.visible"
  3. Changed3 schema fields changedv3.5.0
    • addedInput schema / properties / operations / items / properties / abortOnError
      Added value: +{
      +  "description": "[set_node_properties] Stop processing on first error",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / operations / items / properties / operation / enum
      Previous value: -[
      -  "add_node",
      -  "load_sprite",
      -  "save"
      -]New value: +[
      +  "add_node",
      +  "load_sprite",
      +  "set_node_properties",
      +  "save"
      +]
    • addedInput schema / properties / operations / items / properties / updates
      Added value: +{
      +  "description": "[set_node_properties] Property updates to apply in this operation",
      +  "items": {
      +    "properties": {
      +      "nodePath": {
      +        "description": "Node path from scene root",
      +        "type": "string"
      +      },
      +      "property": {
      +        "description": "Property name in snake_case",
      +        "type": "string"
      +      },
      +      "value": {
      +        "description": "New value. Vector2/Vector3/Color auto-convert from {\"x\",\"y\"} / {\"x\",\"y\",\"z\"} / {\"r\",\"g\",\"b\",\"a\"} objects; primitives pass through"
      +      }
      +    },
      +    "required": [
      +      "nodePath",
      +      "property",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  4. Changed5 schema fields changedv3.3.0
    • addedInput schema / properties / operations / items / properties / modulate
      Added value: +{
      +  "description": "[add_node] Color modulation — shorthand for properties.modulate",
      +  "type": "object"
      +}
    • addedInput schema / properties / operations / items / properties / position
      Added value: +{
      +  "description": "[add_node] Position — {\"x\",\"y\"} for 2D nodes, {\"x\",\"y\",\"z\"} for 3D. Shorthand for properties.position",
      +  "type": "object"
      +}
    • addedInput schema / properties / operations / items / properties / rotation
      Added value: +{
      +  "description": "[add_node] Rotation in radians — shorthand for properties.rotation",
      +  "type": "number"
      +}
    • addedInput schema / properties / operations / items / properties / scale
      Added value: +{
      +  "description": "[add_node] Vector2 scale — shorthand for properties.scale",
      +  "type": "object"
      +}
    • addedInput schema / properties / operations / items / properties / visible
      Added value: +{
      +  "description": "[add_node] Visibility — shorthand for properties.visible",
      +  "type": "boolean"
      +}
  5. Addedv3.1.1
  6. Removedv3.0.0
  7. Addedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

The description discloses important behavioral traits: it runs in a single Godot process, saves once at the end, shares an in-memory cache, and has specific error handling (abortOnError). It also warns that errors occur while a Godot runtime session is active and provides remediation (stop_project or detach_project). This adds substantial value beyond the destructiveHint annotation, which only warns of destructiveness. The description clearly explains the batch semantics and lifecycle, though it doesn't delve into every edge case.

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 dense but structured, front-loading the primary purpose and key benefit (avoiding startup overhead, shared cache). It then lists sub-operations and their parameter equivalences, concluding with error handling and a note about Godot runtime conflicts. While it is somewhat long, every sentence provides useful information; no filler. The structure is logical, moving from purpose to mechanics to side effects.

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?

Given the complexity (multiple sub-operations with differing parameters, nested objects) and the presence of a rich output schema, the description is fairly complete. It covers the core usage, the sub-operation variants, error handling, and an important caveat about Godot runtime sessions. However, it doesn't explicitly explain the ordering semantics beyond 'in input order', which is implied in the schema, and the output schema likely covers return details. Minor gaps but overall adequate.

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?

The schema already provides detailed descriptions for each parameter (e.g., operation enum, per-operation fields like nodePath, properties). The description adds context by explaining how sub-operations map to standalone tools and mentions that add_node items accept the same promoted spatial params, and set_node_properties accept the same per-update params. However, since schema coverage is 100%, the description doesn't add significant semantic beyond what's already in the schema, so a baseline of 3 is appropriate.

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?

The description clearly states the tool's purpose: to batch multiple mutations on scenes in one call, instead of chaining individual calls. It explicitly names the operations it replaces (add_node, load_sprite, save_scene) and lists the supported sub-operations, making its scope unmistakable. It also distinguishes itself from the standalone tools by emphasizing the shared cache and single save.

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?

The description explicitly states when to use this tool: when you have multiple mutations on the same or related scenes, to avoid per-call startup overhead and benefit from a shared cache. It names the alternative (chaining individual tools) and even mentions the error-handling behavior (abortOnError). This gives clear guidance on usage and comparison.

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