Skip to main content
Glama

download_polyhaven_asset

Download Polyhaven assets directly into Blender for 3D projects. Specify asset type, resolution, and format to import HDRIs, textures, or models.

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 handler function for the 'download_polyhaven_asset' tool. It is decorated with @mcp.tool() for registration and @telemetry_tool for telemetry. The function sends the download command to the Blender connection with the provided parameters and handles the response, providing type-specific success messages.
    @telemetry_tool("download_polyhaven_asset")
    @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)}"
  • The @mcp.tool() decorator registers the download_polyhaven_asset function as an MCP tool.
    @mcp.tool()
  • The function signature and docstring define the input schema (parameters) and output type for the 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.
        """
Behavior2/5

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

With no annotations provided, the description carries full burden but lacks critical behavioral details. It doesn't disclose whether this downloads files locally, imports them into an active Blender session, requires authentication, has rate limits, or what happens on failure. The mention of 'Returns a message' is vague about error handling or success confirmation.

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 list. Every sentence adds value: the first establishes the tool's core function, and the parameter explanations are necessary given the lack of schema descriptions. No redundant or verbose 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?

For a 4-parameter tool with no annotations and no output schema, the description does a decent job explaining parameters but lacks completeness in behavioral aspects. It doesn't cover what the tool returns beyond 'a message', error conditions, or integration details with Blender. Given the complexity of downloading and importing assets, more context on the operation's flow would be helpful.

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 well by explaining all 4 parameters with examples and context. It clarifies that 'file_format' is optional and provides format examples per asset type (e.g., 'hdr, exr for HDRIs'), adding meaningful semantics beyond the bare schema. However, it doesn't specify valid values for 'asset_type' or 'resolution' beyond examples.

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'), target resource ('Polyhaven asset'), and destination ('into Blender'). It distinguishes 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 Guidelines4/5

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

The description implies usage context by specifying 'into Blender' and listing asset types, suggesting this is for Blender users working with Polyhaven assets. However, it doesn't explicitly state when to use this versus alternatives like 'download_sketchfab_model' or 'import_generated_asset', nor does it mention prerequisites like having Blender running.

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

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