Skip to main content
Glama

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
NameRequiredDescriptionDefault
idYes
materialYes

Implementation Reference

  • 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)}"

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BearNetwork-BRNKC/SketchUp-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server