Skip to main content
Glama

create_material_layer

Idempotent

Creates a UMaterialFunctionMaterialLayer asset at a content path for reusable material layers in Unreal Engine. Idempotent; returns asset details and save status.

Instructions

Creates a UMaterialFunctionMaterialLayer asset (usage MaterialLayer, exposed to the library) at package_path/name and saves it, like the editor factory. Idempotent: any material function already at that path is returned as is, whatever its class. Success even when the save fails: read saved and save_error.

Returns: { asset_path: string, name: string, class: string, usage: string, created: bool, already_existed: bool, saved: bool, save_error: string }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesAsset name for the new material layer function
package_pathYesContent folder starting with a slash, e.g. /Game/MyGame; a trailing slash is ignored

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.0
    • changedInput schema / properties / package_path / description
      Previous value: -"UE content folder, e.g. /Game/MyGame"New value: +"Content folder starting with a slash, e.g. /Game/MyGame; a trailing slash is ignored"
  2. First observedv1.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, but the description adds real behavioral context: idempotency holds regardless of the existing asset's class, the save can fail yet the call still succeeds, and the caller must inspect 'saved' and 'save_error'. These are non-obvious edge cases beyond what the annotations convey.

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 creation behavior is front-loaded and the edge-case semantics follow compactly in two sentences. The inline Returns block is dense but appropriate given no output schema exists. No filler sentences.

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?

For a create tool with no output schema, the description compensates by spelling out the return object shape and the partial-success semantics. It omits failure modes unrelated to saving and any permission/editor-context requirements, but otherwise covers what an agent needs to call and interpret it.

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% and both parameters are documented in the schema, so the baseline is 3. The description adds only that the two combine as 'package_path/name', which is marginal extra meaning over the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Creates') and a precise resource ('UMaterialFunctionMaterialLayer asset (usage MaterialLayer, exposed to the library)') at 'package_path/name'. The specific asset class implicitly distinguishes it from the many sibling create_* tools. It stops short of naming a sibling like create_material_layer_blend explicitly, so it sits just below the top tier.

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

Usage Guidelines3/5

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

Usage is implied by the idempotency note ('any material function already at that path is returned as is'), which tells an agent not to pre-check existence. However there is no explicit when-to-use/when-not guidance and no reference to alternative tools such as create_material_layer_blend, so guidance is only inferable.

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