Skip to main content
Glama

assign_material_faces

Destructive

Assign an existing material to mesh faces selected by a condition, leaving other faces unchanged and adding a material slot if needed. Create the material with set_material first.

Instructions

Put an existing material on part of a mesh: the picked faces get it, the other faces keep theirs. Adds a slot if the object has none for it. Other faces keep their material. One mesh with several materials costs one draw call per material in the engine, so keep the count low. Create the material first with set_material. where picks faces (or vertices, edges) by a condition, all given keys must hold: normal ('+Z', '-X' or [x,y,z]) with angle (degrees, default 25); x, y, z ranges [min, max] (null means open) on the world centre; box [[x0,y0,z0],[x1,y1,z1]]; area [min, max]; index [...]. {} or null picks everything. Look at mesh_info first to see where the faces are.

Input Schema

NameRequiredDescriptionDefault
whereNo
objectYes
materialYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, so mutation is known; the description adds non-obvious cost behavior (one draw call per material in-engine) and the slot-auto-creation side effect, both beyond annotations. It does not disclose what happens to the overwritten faces' prior material assignment or error behavior for a missing material.

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?

Dense but front-loaded: purpose first, then cost caveat, then the where grammar. Slightly redundant — 'the other faces keep theirs' and 'Other faces keep their material' restate the same fact in adjacent sentences.

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?

For a 3-param mutation tool with no output schema and no meaningful schema descriptions, the description covers the what, the prerequisite chain, the selection grammar, and the performance consequence. An agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and `where` is an opaque open object, so the description must carry the burden — and it does, enumerating all supported keys (normal, angle, x/y/z, box, area, index) with defaults and the {} / null meaning. The `object` and `material` parameters are only implicitly explained (name strings, material must already exist), leaving some ambiguity about accepted identifier formats.

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 (put/assign) and resource (material on picked faces) with the exact scope: picked faces get it, others keep theirs, slot added if needed. This is clearly separable from sibling set_material, which is explicitly named as the prerequisite for creation rather than assignment.

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

Usage Guidelines4/5

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

Provides real workflow sequencing: create the material first with set_material, and inspect mesh_info before picking faces. That is genuine when-to-use guidance, though it never states when NOT to use it or what to do if the material does not exist on the object.

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