Skip to main content
Glama

download_polyhaven_asset

Download and import Poly Haven assets into Blender for 3D modeling and scene creation. Specify asset ID, type, resolution, and format to add HDRIs, textures, or models directly to your project.

Instructions

Download and import a Polyhaven asset into Blender.

Parameters:
- asset_id: The ID of the asset to download
- asset_type: The type of asset (hdris, textures, models)
- resolution: The resolution to download (e.g., 1k, 2k, 4k)
- file_format: Optional file format (e.g., hdr, exr for HDRIs; jpg, png for textures; gltf, fbx for models)

Returns a message indicating success or failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asset_idYes
asset_typeYes
resolutionNo1k
file_formatNo

Implementation Reference

  • The primary handler function for the 'download_polyhaven_asset' MCP tool. It validates inputs via type hints and docstring, registers via @mcp.tool(), proxies parameters to the Blender addon via send_command, and formats the response with asset-type-specific messages.
    @mcp.tool()
    def download_polyhaven_asset(
        ctx: Context,
        asset_id: str,
        asset_type: str,
        resolution: str = "1k",
        file_format: str = None
    ) -> str:
        """
        Download and import a Polyhaven asset into Blender.
        
        Parameters:
        - asset_id: The ID of the asset to download
        - asset_type: The type of asset (hdris, textures, models)
        - resolution: The resolution to download (e.g., 1k, 2k, 4k)
        - file_format: Optional file format (e.g., hdr, exr for HDRIs; jpg, png for textures; gltf, fbx for models)
        
        Returns a message indicating success or failure.
        """
        try:
            blender = get_blender_connection()
            result = blender.send_command("download_polyhaven_asset", {
                "asset_id": asset_id,
                "asset_type": asset_type,
                "resolution": resolution,
                "file_format": file_format
            })
            
            if "error" in result:
                return f"Error: {result['error']}"
            
            if result.get("success"):
                message = result.get("message", "Asset downloaded and imported successfully")
                
                # Add additional information based on asset type
                if asset_type == "hdris":
                    return f"{message}. The HDRI has been set as the world environment."
                elif asset_type == "textures":
                    material_name = result.get("material", "")
                    maps = ", ".join(result.get("maps", []))
                    return f"{message}. Created material '{material_name}' with maps: {maps}."
                elif asset_type == "models":
                    return f"{message}. The model has been imported into the current scene."
                else:
                    return message
            else:
                return f"Failed to download asset: {result.get('message', 'Unknown error')}"
        except Exception as e:
            logger.error(f"Error downloading Polyhaven asset: {str(e)}")
            return f"Error downloading Polyhaven asset: {str(e)}"
  • Documentation in the asset_creation_strategy prompt that describes usage guidelines for the download_polyhaven_asset tool across different asset types.
        1. PolyHaven
            Use get_polyhaven_status() to verify its status
            If PolyHaven is enabled:
            - For objects/models: Use download_polyhaven_asset() with asset_type="models"
            - For materials/textures: Use download_polyhaven_asset() with asset_type="textures"
            - For environment lighting: Use download_polyhaven_asset() with asset_type="hdris"
        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
    """
  • The @mcp.tool() decorator registers the function as an MCP tool, using the function signature and docstring for schema.
    @mcp.tool()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions the tool downloads and imports, implying mutation/write operations, but doesn't disclose behavioral traits like required permissions, whether it overwrites existing files, network dependencies, error handling, or what 'import into Blender' entails operationally. The return message mention is minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by a clear parameter list with brief explanations. Every sentence earns its place with no redundant or vague language.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 parameters, no annotations, and no output schema, the description covers purpose and parameters adequately but lacks behavioral context (e.g., side effects, error cases) and detailed return value explanation beyond 'success or failure message'. For a tool that performs downloads and imports, more operational transparency would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates by explaining all 4 parameters: asset_id (ID to download), asset_type (type like hdris), resolution (e.g., 1k), and file_format (optional, with format examples per type). It adds meaning beyond the bare schema titles, though it doesn't specify allowed values or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Download and import'), the resource ('Polyhaven asset'), and the target environment ('into Blender'). It distinguishes this tool from siblings like 'search_polyhaven_assets' (which finds assets) and 'import_generated_asset' (which imports from other sources).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing to obtain and use Polyhaven assets in Blender, but doesn't explicitly state when to use this vs. alternatives like 'download_sketchfab_model' for different asset sources or 'import_generated_asset' for already-downloaded assets. No explicit exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/drrodingo-del/BlenderMCP'

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