Skip to main content
Glama

set_material

Destructive

Assign a new or rebuilt material to entire meshes in Blender, with color, texture, and glTF export support.

Instructions

Create or rebuild a material (Principled BSDF, exports to glTF) and put it on whole meshes. The quick form is names and color: '#rrggbb' or [r, g, b] in 0..1. Without material the name comes from the numbers, so equal parameters reuse one material (fewer draw calls); an existing name is rebuilt. Slot 0 gets it: use assign_material_faces for parts of a mesh. alpha below 1 is glTF BLEND: glass only, transparent faces cost sorting. emission is {"color": "#ffcc66", "strength": 2.0}. coat is a clear layer. transmission 1 is clear glass (refracting, Cycles and KHR_materials_transmission; use alpha for cheap glass). subsurface does not reach glTF. Image paths (the meshes need a UV map: unwrap or palette_uv first): texture (base colour; color then tints it, '#ffffff' keeps it; alpha multiplies its alpha), normal_map (tangent space), roughness_map and metallic_map (grey), or orm_map instead of those two (R occlusion, G roughness, B metallic). A map replaces its number. bump {"scale": 20, "strength": 0.3} is a procedural noise for renders only: bake_maps turns it into a normal map. The answer has gltf: alphaMode, the factors and the texture slots that will be written. For patterns (wood, bricks, worn metal) use procedural_material.

Input Schema

NameRequiredDescriptionDefault
bumpNo
coatNo
alphaNo
colorYes
namesYes
orm_mapNo
textureNo
emissionNo
materialNo
metallicNo
roughnessNo
normal_mapNo
subsurfaceNo
metallic_mapNo
transmissionNo
roughness_mapNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / transmission
      Added value: +{
      +  "default": 0,
      +  "type": "number"
      +}
  2. First observedv0.4.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, and the description adds real behavior: an existing name is rebuilt, slot 0 is targeted, alpha<1 triggers glTF BLEND and sorting cost, subsurface does not reach glTF, and a map replaces its number. It also notes image maps require a UV map first.

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-loads purpose and the quick `names`+`color` form, then layers optional features. It is dense and occasionally telegraphic (e.g. 'coat is a clear layer'), but with 16 params and no schema descriptions nearly every clause earns its place.

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?

With no output schema, it still describes the return ('The answer has `gltf`: alphaMode, the factors and the texture slots that will be written'), and it covers prerequisites (UV map) and glTF export caveats. Complete for a high-complexity mutation tool.

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?

Schema coverage is 0%, so the description carries the whole burden across 16 params and does so: color formats ('#rrggbb' or [r,g,b] in 0..1), material-name derivation, emission shape, coat/transmission/alpha semantics, texture/normal/roughness/metallic/orm map roles, and bump. This substantially compensates for the missing schema descriptions.

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 specific verb+resource ('Create or rebuild a material (Principled BSDF, exports to glTF)') and scope ('put it on whole meshes'). It explicitly distinguishes itself from siblings: 'use assign_material_faces for parts of a mesh' and 'For patterns ... use procedural_material.'

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?

Names alternatives and the selecting condition: assign_material_faces for parts, procedural_material for patterns, bake_maps to convert a bump, alpha for cheap glass vs transmission for refracting glass. It also gates texture maps behind a prior unwrap/palette_uv step.

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