Skip to main content
Glama

download_sketchfab_model

Download and import Sketchfab models into Blender using their unique UID for 3D modeling and scene creation.

Instructions

Download and import a Sketchfab model by its UID.

Parameters:

  • uid: The unique identifier of the Sketchfab model

Returns a message indicating success or failure. The model must be downloadable and you must have proper access rights.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYes

Implementation Reference

  • The main handler function for the 'download_sketchfab_model' MCP tool. It connects to the Blender addon, sends the model UID via send_command('download_sketchfab_model'), and processes the response, returning success message with imported objects or error.
    def download_sketchfab_model( ctx: Context, uid: str ) -> str: """ Download and import a Sketchfab model by its UID. Parameters: - uid: The unique identifier of the Sketchfab model Returns a message indicating success or failure. The model must be downloadable and you must have proper access rights. """ try: blender = get_blender_connection() logger.info(f"Attempting to download Sketchfab model with UID: {uid}") result = blender.send_command("download_sketchfab_model", { "uid": uid }) if result is None: logger.error("Received None result from Sketchfab download") return "Error: Received no response from Sketchfab download request" if "error" in result: logger.error(f"Error from Sketchfab download: {result['error']}") return f"Error: {result['error']}" if result.get("success"): imported_objects = result.get("imported_objects", []) object_names = ", ".join(imported_objects) if imported_objects else "none" return f"Successfully imported model. Created objects: {object_names}" else: return f"Failed to download model: {result.get('message', 'Unknown error')}" except Exception as e: logger.error(f"Error downloading Sketchfab model: {str(e)}") import traceback logger.error(traceback.format_exc()) return f"Error downloading Sketchfab model: {str(e)}"
  • The docstring defines the tool schema: input parameter 'uid' (str), returns str message on success/failure.
    """ Download and import a Sketchfab model by its UID. Parameters: - uid: The unique identifier of the Sketchfab model Returns a message indicating success or failure. The model must be downloadable and you must have proper access rights. """
  • The @mcp.tool() decorator registers this function as an MCP tool.
    def download_sketchfab_model(
  • The asset_creation_strategy prompt guides usage: check status, search models, then download using UID.
    2. Sketchfab Sketchfab is good at Realistic models, and has a wider variety of models than PolyHaven. Use get_sketchfab_status() to verify its status If Sketchfab is enabled: - For objects/models: First search using search_sketchfab_models() with your query - Then download specific models using download_sketchfab_model() with the UID - Note that only downloadable models can be accessed, and API key must be properly configured - Sketchfab has a wider variety of models than PolyHaven, especially for specific subjects 3. Hyper3D(Rodin) Hyper3D Rodin is good at generating 3D models for single item. So don't try to: 1. Generate the whole scene with one shot 2. Generate ground using Hyper3D 3. Generate parts of the items separately and put them together afterwards Use get_hyper3d_status() to verify its status If Hyper3D is enabled: - For objects/models, do the following steps: 1. Create the model generation task - Use generate_hyper3d_model_via_images() if image(s) is/are given - Use generate_hyper3d_model_via_text() if generating 3D asset using text prompt If key type is free_trial and insufficient balance error returned, tell the user that the free trial key can only generated limited models everyday, they can choose to: - Wait for another day and try again - Go to hyper3d.ai to find out how to get their own API key - Go to fal.ai to get their own private API key 2. Poll the status - Use poll_rodin_job_status() to check if the generation task has completed or failed 3. Import the asset - Use import_generated_asset() to import the generated GLB model the asset 4. After importing the asset, ALWAYS check the world_bounding_box of the imported mesh, and adjust the mesh's location and size Adjust the imported mesh's location, scale, rotation, so that the mesh is on the right spot. You can reuse assets previous generated by running python code to duplicate the object, without creating another generation task. 3. Always check the world_bounding_box for each item so that: - Ensure that all objects that should not be clipping are not clipping. - Items have right spatial relationship. 4. Recommended asset source priority: - For specific existing objects: First try Sketchfab, then PolyHaven - For generic objects/furniture: First try PolyHaven, then Sketchfab - For custom or unique items not available in libraries: Use Hyper3D Rodin - For environment lighting: Use PolyHaven HDRIs - For materials/textures: Use PolyHaven textures Only fall back to scripting when: - PolyHaven, Sketchfab, and Hyper3D are all disabled - A simple primitive is explicitly requested - No suitable asset exists in any of the libraries - Hyper3D Rodin failed to generate the desired asset - The task specifically requires a basic material/color """

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/johncarlo177/Python.BlenderMCP'

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