Skip to main content
Glama
opslon

BlenderMCP

by opslon

get_sketchfab_model_preview

Retrieve a Sketchfab model thumbnail using its UID to visually verify the model before downloading it into Blender.

Instructions

Get a preview thumbnail of a Sketchfab model by its UID. Use this to visually confirm a model before downloading.

Parameters:

  • uid: The unique identifier of the Sketchfab model (obtained from search_sketchfab_models)

Returns the model's thumbnail as an Image for visual confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYes

Implementation Reference

  • Implementation of the 'get_sketchfab_model_preview' tool, which handles the request to the Blender connection and returns the model thumbnail.
    @mcp.tool()
    def get_sketchfab_model_preview(
        ctx: Context,
        uid: str
    ) -> Image:
        """
        Get a preview thumbnail of a Sketchfab model by its UID.
        Use this to visually confirm a model before downloading.
        
        Parameters:
        - uid: The unique identifier of the Sketchfab model (obtained from search_sketchfab_models)
        
        Returns the model's thumbnail as an Image for visual confirmation.
        """
        try:
            blender = get_blender_connection()
            logger.info(f"Getting Sketchfab model preview for UID: {uid}")
            
            result = blender.send_command("get_sketchfab_model_preview", {"uid": uid})
            
            if result is None:
                raise Exception("Received no response from Blender")
            
            if "error" in result:
                raise Exception(result["error"])
            
            # Decode base64 image data
            image_data = base64.b64decode(result["image_data"])
            img_format = result.get("format", "jpeg")
            
            # Log model info

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/opslon/blender-mcp-optimized'

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