Skip to main content
Glama

node_set_property

Set a property on a Godot node by path, automatically coercing values to match the property type, including Vector2/3, Color, NodePath, and Resource.

Instructions

Set a property on a node.

Verify the property name first — call node_get_properties (or read godot://node/{path}/properties) to confirm the exact name and type before writing. Guessing common Godot names often fails with PROPERTY_NOT_ON_CLASS because Godot's actual properties differ from intuition (e.g. Camera3D uses fov/current, not field_of_view; Sprite2D uses texture, not image; Node3D uses position/rotation/scale, not transform.origin).

Coerces value to the property's type:

  • Vector2/Vector3: dict with x/y/z keys.

  • Color: dict {r,g,b,a} or hex string ("#ff0000").

  • NodePath: string ("../Other/Node").

  • Resource: res:// path string (loads + assigns); null/"" clears. {"__class__": "BoxMesh", ...} creates a built-in resource owned by this property. After scene_save it is serialized in-place as a [sub_resource] inside the .tscn; it is not a reusable .tres. For sharing, first call resource_manage(op="create", params={"type": "BoxMesh", "properties": {...}, "resource_path": "res://meshes/box.tres"}), then pass that res:// path here (or use resource_manage(op="assign")).

  • StringName: plain string. Array/Dictionary: JSON list/object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesScene path relative to the edited scene root (e.g. "/Main/Camera3D"), NOT runtime "/root/..." paths.
valueYesNew value. Pass null (or "" for resources) to clear.
propertyYesProperty name (e.g. "fov", "position", "mesh"). Must match Godot's exact identifier — introspect with ``node_get_properties`` if unsure rather than guessing.
scene_fileNoOptional editor-scene guard.
session_idNoOptional Godot session to target. Empty = active session.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.1.4
  2. Removedv3.0.7
  3. First observedv2.9.1

TDQS

A5/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden, and it delivers: it discloses type coercion formats for Vector, Color, NodePath, Resource, StringName, and Array/Dictionary, and explains resource ownership, serialization as [sub_resource], and that null/'' clears. This is rich behavioral disclosure beyond the obvious 'setter' semantics.

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?

The description is front-loaded with the core action, then uses compact bullet-like sections for coercion and resource behavior. Every sentence adds operational value, and the organization makes the long content scannable.

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

Completeness5/5

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

Covers the critical failure mode (PROPERTY_NOT_ON_CLASS), value clearing, resource lifecycle, sharing strategy, and serialization timing. With an output schema available to describe return values, nothing essential is missing for correct invocation.

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?

Although schema coverage is 100%, the description substantially extends the schema by explaining how to encode Godot property values (e.g., Vector3 dict keys, Color hex strings, res:// paths, __class__ resource creation). It also clarifies the path parameter's relative-to-scene-root meaning and property-name exactness.

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?

Opens with a clear verb+resource statement ('Set a property on a node'), then reinforces scope by contrasting with node_get_properties and giving Godot-specific examples. It is easily distinguished from sibling tools like node_create or node_manage.

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 instructs the agent to verify property names with node_get_properties before writing, and explains when to use resource_manage(op='create') instead of inline resource creation for shareable resources. This gives concrete selection and sequencing guidance.

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