set_material
Assign a specific material to a component in Sketchup using the SketchupMCP integration, enabling precise control over 3D model appearances directly through Claude AI.
Instructions
Set material for a component
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| material | Yes |
Implementation Reference
- src/sketchup_mcp/server.py:360-382 (handler)The handler function for the 'set_material' MCP tool. It is decorated with @mcp.tool() for registration and forwards the material setting request to the Sketchup extension via JSON-RPC.@mcp.tool() def set_material( ctx: Context, id: str, material: str ) -> str: """Set material for a component""" try: sketchup = get_sketchup_connection() result = sketchup.send_command( method="tools/call", params={ "name": "set_material", "arguments": { "id": id, "material": material } }, request_id=ctx.request_id ) return json.dumps(result) except Exception as e: return f"Error setting material: {str(e)}"