set_material
Assign or paint a material color on a SketchUp group, component instance, face, or edge using an existing material name, named color, or hex string.
Instructions
Assign a material (color) to a group, component instance, face or edge.
material: a material already in the model, matched by name without regard to case, is used as is (so an existing "Red" is used for "red"). Otherwise a named color — red, green, blue, yellow, cyan, turquoise, magenta, purple, white, black, brown, wood, orange, gray, grey — or a 6-digit hex string like "#a05030" (#rrggbb), in any case, maps to one lower-case material, found or created. Anything else fails with -32602. Painting a group/component affects only this instance (it is made unique first); painting a raw face/edge id (obtainable via get_selection) colors the shared definition — all instances show it.
Returns: JSON {id, name, type, bbox_mm{min,max}|null}. For a face or edge, type is "face" or "edge" and name is null.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"material": "<material>"
},
"name": "set_material"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Entity ID from a previous response (integer or its string form) | |
| material | Yes | Name of a material already in the model, named color, or 6-digit hex string like #a05030 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |