Skip to main content
Glama

duplicate_material_expression

Copy an expression node within a UMaterial, optionally rename it, then recompile and mark the material dirty without saving. The copy's output stays unwired.

Instructions

Copy one expression node of a UMaterial asset into the same material, optionally renamed, then recompile the material and mark it dirty without saving. The copy keeps the source position and settings (a parameter keeps its name) and its output is unwired. Returns duplicate_node and expression_count.

Returns: { material_path: string, source_node: string, duplicate_node: string, duplicate_class: string, expression_count: number }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
node_idYesObject name of the expression to copy, as listed by get_material_expressions.
material_pathYesFull asset path of the UMaterial.
new_node_nameNoObject name for the copy; when taken, a unique variant is used (read duplicate_node). Default: a name the engine picks.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.2.0
    • changedInput schema / properties / new_node_name / description
      Previous value: -"Optional rename for the duplicate (optional)"New value: +"Object name for the copy; when taken, a unique variant is used (read duplicate_node). Default: a name the engine picks."
    • changedInput schema / properties / node_id / description
      Previous value: -"Name of the source expression."New value: +"Object name of the expression to copy, as listed by get_material_expressions."
  2. First observedv1.1.0

TDQS

A3.9/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false), the description discloses significant behavioral traits: it recompiles the material, marks it dirty without saving, preserves source position/settings, keeps parameter names, and leaves the copy's output unwired. This is exactly the kind of side-effect detail an agent needs for a mutation 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 effect, and the behavioral caveats are packed efficiently into two sentences. The final 'Returns duplicate_node and expression_count' sentence is redundant with the full Returns object that follows, a minor waste.

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?

No output schema exists, but the description explicitly enumerates the return fields, and it covers the mutation's side effects and save semantics ('without saving'). The only gap is the absence of guidance on follow-up actions like saving or the prerequisite of listing expressions first.

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?

Schema description coverage is 100%, so the baseline is 3. The description does add semantic color ('optionally renamed', 'a parameter keeps its name'), but it does not document new_node_name collision handling beyond restating the schema's unique-variant note.

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 (copy/duplicate) and resource (one expression node of a UMaterial asset), plus the scope ('into the same material'). It is unmistakable against siblings like duplicate_asset or copy_material_instance_params, which operate on different resources.

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

Usage Guidelines2/5

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

The description describes the effect but gives no guidance on when to choose this tool versus alternatives (e.g., create_material_expression or copy_material_instance_params), nor any prerequisites. Usage is only inferable from the tool name and effect, not stated.

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

Deploy Server

Other Tools