Skip to main content
Glama

set_material_instance_param

DestructiveIdempotent

Set a global scalar, vector, texture, or static-switch parameter on a Material Instance Constant asset and re-read it to verify the change.

Instructions

Set a scalar, vector, texture or static-switch global parameter on a Material Instance Constant asset and re-read it: set comes from the re-read (the engine setter always returns false), plus value_after and overridden_after. Malformed vectors are rejected. Marks the package dirty; does not save.

Returns: { instance: string, instance_path: string, param_name: string, param_type: string, value_format?: string, set: bool, value_after: number|object|string|bool|null, overridden_after: bool, value_requested: number|object|string|bool, requested: {...} }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueNoValue. Scalar: a number (JSON number or numeric string). Vector: '(R=..,G=..,B=..,A=..)', '[r,g,b,a]', '[r,g,b]', 'r,g,b,a', 'r,g,b', or a real JSON array of 3-4 numbers; anything else is REJECTED (never written as black). Texture: an asset path. Static switch: a bool or 'true'/'false'.
param_nameYesParameter name as defined in the parent material, e.g. "BaseTint"; only global parameters are reached, not layer parameters.
param_typeNo"scalar" | "vector" | "texture" | "static_switch" (optional, inferred from the value: a JSON array => vector, a JSON bool => static_switch, a JSON number => scalar, a string starting with '/' => texture, with '(' or '[' => vector, else scalar. A bool passed AS A STRING still reads as scalar, so pass param_type explicitly in that case)
instance_pathYesAsset path of the UMaterialInstanceConstant, e.g. "/Game/Materials/MI_Rock".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.2.0
    • changedInput schema / properties / instance_path / description
      Previous value: -"Material instance asset path."New value: +"Asset path of the UMaterialInstanceConstant, e.g. \"/Game/Materials/MI_Rock\"."
    • changedInput schema / properties / param_name / description
      Previous value: -"Parameter name."New value: +"Parameter name as defined in the parent material, e.g. \"BaseTint\"; only global parameters are reached, not layer parameters."
  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?

It goes well beyond the annotations (readOnly=false, destructive=true, idempotent=true) by disclosing mutation side effects ('Marks the package dirty; does not save'), validation behavior ('Malformed vectors are rejected', 'never written as black'), and non-obvious setter semantics ('set comes from the re-read (the engine setter always returns false)'). It also spells out the full response shape with value_after, overridden_after and requested, which an agent cannot infer from annotations alone.

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 behavioral contract is front-loaded in the first sentence, followed by a clearly delimited Returns block. The Returns block is dense but earns its place since no output schema exists. Slightly verbose in enumerating every response field, but no wasted prose.

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?

With no output schema, the inline Returns block fully covers the return contract, and the description covers validation, re-read semantics, and the dirty-but-not-saved side effect. The remaining gap is routing guidance versus sibling material-parameter setters, which is left implicit.

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 schema already documents value formats, param_type inference, instance_path and param_name in detail. The description's parameter information ('scalar, vector, texture or static-switch global parameter') largely repeats what the schema already conveys, so baseline 3 is appropriate.

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 opening sentence states a specific verb (Set) and a precisely scoped resource (a global scalar/vector/texture/static-switch parameter on a Material Instance Constant asset), so an agent immediately knows what is being mutated. It does not explicitly name or differentiate from the many sibling setters (set_mid_scalar_param, set_material_instance_static_switch, set_material_instance_param_override), leaving that differentiation to implicit clues like 'Material Instance Constant' vs 'Dynamic'.

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?

The description never states when to choose this tool over a sibling such as set_mid_scalar_param or set_material_instance_static_switch, nor any prerequisite context. Usage is only implied by the name and the parameter-type enumeration, so this is adequate but with clear gaps.

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