set_material
Assign specific materials to components in Sketchup using the Model Context Protocol. Simplify 3D modeling by integrating AI-driven material customization directly into your workflow.
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 MCP tool handler for 'set_material'. It connects to Sketchup and proxies the call to Sketchup's internal 'set_material' tool via JSON-RPC, passing the component id and material name.@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)}"