Skip to main content
Glama
Eminemminem

BlenderMCP

by Eminemminem

search_polyhaven_assets

Search Polyhaven for 3D assets like HDRI environments, textures, and models to import into Blender projects, with filtering by type and category.

Instructions

Search for assets on Polyhaven with optional filtering.

Parameters:

  • asset_type: Type of assets to search for (hdris, textures, models, all)

  • categories: Optional comma-separated list of categories to filter by

Returns a list of matching assets with basic information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asset_typeNoall
categoriesNo

Implementation Reference

  • The handler function for the 'search_polyhaven_assets' tool. It connects to Blender, sends the search command with parameters, processes the response, formats it into a readable list sorted by popularity, and handles errors.
    @mcp.tool()
    def search_polyhaven_assets(
        ctx: Context,
        asset_type: str = "all",
        categories: str = None
    ) -> str:
        """
        Search for assets on Polyhaven with optional filtering.
        
        Parameters:
        - asset_type: Type of assets to search for (hdris, textures, models, all)
        - categories: Optional comma-separated list of categories to filter by
        
        Returns a list of matching assets with basic information.
        """
        try:
            blender = get_blender_connection()
            result = blender.send_command("search_polyhaven_assets", {
                "asset_type": asset_type,
                "categories": categories
            })
            
            if "error" in result:
                return f"Error: {result['error']}"
            
            # Format the assets in a more readable way
            assets = result["assets"]
            total_count = result["total_count"]
            returned_count = result["returned_count"]
            
            formatted_output = f"Found {total_count} assets"
            if categories:
                formatted_output += f" in categories: {categories}"
            formatted_output += f"\nShowing {returned_count} assets:\n\n"
            
            # Sort assets by download count (popularity)
            sorted_assets = sorted(assets.items(), key=lambda x: x[1].get("download_count", 0), reverse=True)
            
            for asset_id, asset_data in sorted_assets:
                formatted_output += f"- {asset_data.get('name', asset_id)} (ID: {asset_id})\n"
                formatted_output += f"  Type: {['HDRI', 'Texture', 'Model'][asset_data.get('type', 0)]}\n"
                formatted_output += f"  Categories: {', '.join(asset_data.get('categories', []))}\n"
                formatted_output += f"  Downloads: {asset_data.get('download_count', 'Unknown')}\n\n"
            
            return formatted_output
        except Exception as e:
            logger.error(f"Error searching Polyhaven assets: {str(e)}")
            return f"Error searching Polyhaven assets: {str(e)}"
  • Registers the search_polyhaven_assets tool using the FastMCP decorator.
    @mcp.tool()
  • Defines the input schema via function parameters and docstring documentation for asset_type and categories parameters.
    def search_polyhaven_assets(
        ctx: Context,
        asset_type: str = "all",
        categories: str = None
    ) -> str:
        """
        Search for assets on Polyhaven with optional filtering.
        
        Parameters:
        - asset_type: Type of assets to search for (hdris, textures, models, all)
        - categories: Optional comma-separated list of categories to filter by
        
        Returns a list of matching assets with basic information.
        """
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that the tool 'Returns a list of matching assets with basic information,' which gives some output context, but lacks details on rate limits, authentication needs, pagination, error handling, or what constitutes 'basic information.' For a search tool with no annotation coverage, this is insufficient.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded, with a clear purpose statement followed by parameter details. It avoids redundancy and uses bullet points for readability. However, the second sentence ('Returns a list...') could be integrated more smoothly, and some minor phrasing improvements are possible.

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 the tool's moderate complexity (search with filtering), no annotations, no output schema, and 2 parameters with low schema coverage, the description is minimally adequate. It covers the basic purpose and parameters but lacks details on output structure, error cases, or integration with siblings like 'download_polyhaven_asset.' It meets the baseline for a simple search tool but has clear gaps in guidance and behavioral context.

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 adds meaningful semantics beyond the input schema, which has 0% description coverage. It explains that 'asset_type' can be 'hdris, textures, models, all' and 'categories' is an 'Optional comma-separated list of categories to filter by,' clarifying usage that the schema alone does not provide. With 2 parameters and low schema coverage, this compensation is effective, though not exhaustive (e.g., no examples of categories).

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 tool's purpose: 'Search for assets on Polyhaven with optional filtering.' It specifies the verb ('Search') and resource ('assets on Polyhaven'), making the function unambiguous. However, it does not explicitly differentiate from sibling tools like 'search_sketchfab_models' or 'get_polyhaven_categories', which would be needed for a score of 5.

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?

The description provides no guidance on when to use this tool versus alternatives. It mentions optional filtering but does not specify scenarios, prerequisites, or exclusions. For example, it does not clarify when to use this versus 'get_polyhaven_categories' or 'search_sketchfab_models', leaving the agent without contextual direction.

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

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