Skip to main content
Glama

delete_nodes

Destructive

Remove one or more nodes and their descendants from a Godot scene file, saving once at the end and returning a success or error result for each node.

Instructions

Remove one or more nodes, with their descendants, from a scene. Always-array: pass a single-element nodePaths array for a one-off delete. Saves once at the end. The scene root, a node inside an instanced scene, and a node inherited from a base scene cannot be deleted: that entry reports an error and the rest still process. Returns: results[], one entry per nodePath in input order, each with success or error. Errors while a runtime session is live on this project.

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>",
      "scenePath": "<scenePath>",
      "nodePaths": "<nodePaths>"
    },
    "name": "delete_nodes"
  }
}

Input Schema

NameRequiredDescriptionDefault
nodePathsYesNode paths from scene root to delete (e.g. ["root/Player/Sprite2D"])
scenePathYesScene file path relative to the project (e.g. "scenes/main.tscn")
projectPathYesPath to the Godot project directory

Output Schema

NameRequiredDescriptionDefault
resultsYes
warningsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv4.0.1
    • addedOutput schema / properties / results / items / properties / resolvedNodePath
      Added value: +{
      +  "description": "Where nodePath led, in root/... form. Present when the node was found; differs from nodePath for a %Name path.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / required
      Added value: +[
      +  "results"
      +]
  2. Addedv3.1.1

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond destructiveHint=true: it discloses write batching ("Saves once at the end"), partial-failure semantics (failing entries error while the rest still process), and an environment precondition (errors when a runtime session is live). These are exactly the behavioral traits an agent needs before invoking a destructive tool.

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?

Front-loaded with the action and scope, then constraints, then return shape; every sentence carries information. The final sentence is a telegraphic fragment ("Errors while a runtime session is live on this project"), which slightly hurts readability but costs no real length.

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 the destructive nature, save behavior, partial failure, protected-node rules, and result ordering, and an output schema exists for the return shape. Minor gap: it never states how to recover from or diagnose the runtime-session error, but nothing an agent needs to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds real meaning: nodePaths is always an array even for one item, and results are returned per nodePath in input order. That clarifies semantics the schema alone does not convey.

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 ("Remove one or more nodes, with their descendants, from a scene") and clarifies scope with the descendant caveat, which no other sibling (move_nodes, duplicate_node) covers. An agent can immediately tell this is the deletion tool.

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

Usage Guidelines4/5

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

Gives concrete how-to-use guidance ("Always-array: pass a single-element nodePaths array for a one-off delete") and clear exclusion rules (root, instanced-scene nodes, inherited nodes cannot be deleted). It stops short of naming an alternative tool or a broader when-to-prefer-this workflow, so it is strong but not a full 5.

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