Skip to main content
Glama

get_polyhaven_categories

Retrieve available categories for Polyhaven assets to organize and filter 3D content in Blender. Specify asset type (HDRI, textures, models) to get relevant categories.

Instructions

Get a list of categories for a specific asset type on Polyhaven.

Parameters:
- asset_type: The type of asset to get categories for (hdris, textures, models, all)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asset_typeNohdris

Implementation Reference

  • Registration of the get_polyhaven_categories tool using the @mcp.tool() decorator.
    @mcp.tool()
  • The main handler function that implements the tool logic: connects to Blender, checks PolyHaven status, sends the 'get_polyhaven_categories' command to the Blender addon, receives the result, formats it by sorting categories by asset count, and returns a readable string.
    def get_polyhaven_categories(ctx: Context, asset_type: str = "hdris") -> str:
        """
        Get a list of categories for a specific asset type on Polyhaven.
        
        Parameters:
        - asset_type: The type of asset to get categories for (hdris, textures, models, all)
        """
        try:
            blender = get_blender_connection()
            if not _polyhaven_enabled:
                return "PolyHaven integration is disabled. Select it in the sidebar in BlenderMCP, then run it again."
            result = blender.send_command("get_polyhaven_categories", {"asset_type": asset_type})
            
            if "error" in result:
                return f"Error: {result['error']}"
            
            # Format the categories in a more readable way
            categories = result["categories"]
            formatted_output = f"Categories for {asset_type}:\n\n"
            
            # Sort categories by count (descending)
            sorted_categories = sorted(categories.items(), key=lambda x: x[1], reverse=True)
            
            for category, count in sorted_categories:
                formatted_output += f"- {category}: {count} assets\n"
            
            return formatted_output
        except Exception as e:
            logger.error(f"Error getting Polyhaven categories: {str(e)}")
            return f"Error getting Polyhaven categories: {str(e)}"
  • Type hints and docstring define the input schema (asset_type: str = 'hdris') and output (str).
    def get_polyhaven_categories(ctx: Context, asset_type: str = "hdris") -> str:
        """
        Get a list of categories for a specific asset type on Polyhaven.
        
        Parameters:
        - asset_type: The type of asset to get categories for (hdris, textures, models, all)
        """
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 states the tool 'Get[s] a list of categories,' implying a read-only operation, but does not detail aspects like whether it requires authentication, rate limits, error handling, or the format of the returned list. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 concise and well-structured, with a clear purpose statement followed by a bullet point for parameters. Every sentence earns its place by directly contributing to understanding the tool's function and inputs, with no redundant or extraneous information.

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 low complexity (1 parameter, no output schema, no annotations), the description is minimally complete. It explains what the tool does and the parameter options, but lacks details on behavioral traits (e.g., response format, errors) and usage context. This is adequate for a simple read operation but leaves gaps that could hinder effective use.

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 context for the single parameter 'asset_type' by listing its possible values (hdris, textures, models, all), which the input schema does not provide (schema description coverage is 0%). This compensates for the schema's lack of detail, giving the agent clear guidance on valid inputs. Since there is only one parameter, the description adequately covers its semantics.

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: 'Get a list of categories for a specific asset type on Polyhaven.' It specifies the verb ('Get'), resource ('categories'), and scope ('for a specific asset type on Polyhaven'), making the intent unambiguous. However, it does not explicitly differentiate this tool from its sibling 'search_polyhaven_assets', which might also involve categories, so it lacks sibling differentiation.

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 the parameter 'asset_type' but does not explain why or when to call this tool, such as for filtering assets by category before searching or downloading. With multiple sibling tools like 'search_polyhaven_assets' and 'download_polyhaven_asset', the absence of usage context leaves the agent without clear 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/drrodingo-del/BlenderMCP'

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