Skip to main content
Glama
ujs204

BlenderMCP

by ujs204

download_polyhaven_asset

Download Polyhaven assets (HDRI, textures, models) directly into Blender with specified resolution and format for 3D scene creation.

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

  • MCP tool handler for download_polyhaven_asset. Proxies parameters to Blender addon via send_command and handles the response with 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)}"
  • Input schema defined in the tool's docstring parameters.
    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.
  • The @mcp.tool() decorator registers this function as an MCP tool.
    @mcp.tool()
  • Usage instructions in the asset_creation_strategy prompt.
    - 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"
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the action ('Download and import') and return type ('message indicating success or failure'), but lacks details on critical behaviors like whether it requires internet connectivity, what happens if the asset already exists, expected download times, or error handling specifics.

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 efficiently structured with a clear purpose statement followed by a bulleted parameter explanation and return information. Every sentence adds value without redundancy, and it's appropriately sized for the tool's complexity.

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 with 0% schema coverage and no output schema, the description does well explaining parameters but lacks completeness for a download/import operation. It doesn't cover behavioral aspects like network requirements, file system impacts, or integration specifics with Blender, which are important for this type of tool.

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?

The description provides meaningful context for all 4 parameters beyond the schema's 0% coverage, explaining what each parameter represents with examples (e.g., '1k, 2k, 4k' for resolution, format examples per asset type). This significantly compensates for the schema's lack of descriptions, 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.

Purpose4/5

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

The description clearly states the action ('Download and import') and target resource ('a Polyhaven asset into Blender'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'import_generated_asset' or 'set_texture', which could involve similar import operations in Blender.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't mention whether this should be used after 'search_polyhaven_assets' or instead of 'import_generated_asset', nor does it specify prerequisites like having Blender open or connected.

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/ujs204/CLAUDE-BLENDER-MCP'

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