Skip to main content
Glama

set_material

Assign Principled BSDF materials to meshes by color, texture, alpha, emission, or maps, returning glTF-compatible material settings for export.

Instructions

Give meshes a material (Principled BSDF, exports to glTF). 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. 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

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and discloses extensive behavior: material reuse and rebuilding ('equal parameters reuse one material... an existing name is rebuilt'), slot assignment ('Slot 0 gets it'), glTF export implications for alpha and subsurface, map channel packing for orm_map, render-only behavior of bump with bake_maps, and the response shape ('The answer has gltf: alphaMode...').

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 description is front-loaded with purpose and quick form, and every sentence adds needed information for a 15-parameter tool with no schema descriptions. However, the dense parenthetical style and run-on parameter explanations reduce scannability compared to a more structured presentation.

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?

Given 15 parameters, 0% schema description coverage, no annotations, and no output schema, the description is complete enough: it covers prerequisites, alternatives, export behavior, behavioral side effects, parameter semantics, and the return values described as a gltf object. Nothing critical an agent needs to call the tool correctly is missing.

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 description coverage is 0%, so the description must compensate and does so thoroughly. It explains accepted formats for names/color, the optional material name override, alpha glTF BLEND semantics, emission object format, coat and subsurface export behavior, texture tinting and alpha multiplication, normal_map tangent space, roughness/metallic map channels, orm_map packing, and bump scale/strength. The only lightly covered parameters, metallic and roughness, are still contextualized through 'A map replaces its number.'

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?

The description states a specific verb and resource: 'Give meshes a material (Principled BSDF, exports to glTF).' It clearly distinguishes this tool from siblings by naming assign_material_faces for parts of a mesh and procedural_material for patterns, so an agent can select it without opening 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 Guidelines5/5

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

It gives explicit alternatives and conditions: 'use assign_material_faces for parts of a mesh' and 'For patterns (wood, bricks, worn metal) use procedural_material.' It also states prerequisites for texture maps: 'the meshes need a UV map: unwrap or palette_uv first,' and explains when alpha below 1 is appropriate (glass only) versus costly transparent faces.

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