Skip to main content
Glama

set_resource_properties

Idempotent

Updates named property values in an existing .tres resource file and saves it. Validates each value against its declared type and writes nothing if any name or value is invalid.

Instructions

Set property values in an existing .tres resource file and save it. Properties not named, sub-resources and uids stay as the file has them. A Dictionary or Array value replaces the stored one whole; send every key. Values are checked against declared types as in set_node_properties (Property Values in docs/tools.md); one invalid name or value errors and writes nothing. Returns: resourcePath, resourceType, scriptPath, the named properties read back. Errors while a runtime session is live.

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>",
      "resourcePath": "<resourcePath>",
      "properties": "<properties>"
    },
    "name": "set_resource_properties"
  }
}

Input Schema

NameRequiredDescriptionDefault
propertiesYesProperty values to set, at least one, keyed by property name as written, with the same value rules as set_node_properties. script and resource_path are refused.
projectPathYesPath to the Godot project directory
resourcePathYesPath of the .tres file inside the project, e.g. "items/sword.tres".

Output Schema

NameRequiredDescriptionDefault
warningsNo
propertiesYesEach property the call set, read back from the saved file, in the shapes set_node_properties accepts.
scriptPathYesProject-relative path of its script, or null.
resourcePathYesProject-relative path of the .tres file written.
resourceTypeYesEngine class of the saved resource (Resource for a script class).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.1

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare idempotentHint, so the description carries the burden and does it well: unnamed properties, sub-resources and uids are preserved, Dictionary/Array values replace wholesale, type validation applies, and a single invalid name or value aborts the entire write atomically. It also discloses the live-session error condition and the returned fields.

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-loaded with the core action, then layered preservation rules, replacement semantics, validation/atomicity, return values and error conditions in a short dense block. No sentence is filler, though the telegraphic phrasing is at the edge of terse.

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?

For a 3-parameter nested-object mutation tool with an output schema, the description covers the things structured fields cannot: merge semantics, atomic failure, live-session errors, and what stays untouched. Nothing an agent needs to invoke 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 the baseline is 3, but the description adds genuine meaning beyond the schema by explaining merge-vs-replace semantics for the properties object and the "send every key" rule for containers. It also reinforces that script and resource_path are refused.

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?

"Set property values in an existing .tres resource file and save it" names a specific verb, resource type and persistence effect, which cleanly separates it from create_resource (new files) and set_node_properties (scene nodes). An agent knows exactly what operation this performs before reading the schema.

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?

The description establishes the precondition clearly: the resource must already exist, and calls fail while a runtime session is live. It stops short of explicitly routing the agent to create_resource for new files, but the "existing" framing makes the boundary inferable.

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