Skip to main content
Glama
ujs204

BlenderMCP

by ujs204

get_polyhaven_categories

Retrieve Polyhaven asset categories to organize and filter 3D resources for Blender projects. Specify asset type (HDRI, textures, models) to get relevant category lists.

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

  • The handler function decorated with @mcp.tool(), implementing the get_polyhaven_categories tool. It checks PolyHaven status, sends the command to Blender addon, receives categories, sorts them by count, and formats output.
    @mcp.tool()
    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)}"
  • The @mcp.tool() decorator registers the get_polyhaven_categories function as an MCP tool.
    @mcp.tool()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves a list of categories, implying a read-only operation, but doesn't cover critical aspects like authentication needs, rate limits, error handling, or response format. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves in practice.

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: the first sentence clearly states the purpose, followed by a brief parameter section. There's no unnecessary verbosity, and each sentence adds value. However, the structure could be slightly improved by integrating parameter details more seamlessly, but it remains efficient overall.

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

Completeness2/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 incomplete. It covers the basic purpose and parameter but lacks context on usage, behavioral traits, and output details. Without annotations or an output schema, the description should do more to explain what the returned list looks like and any operational constraints, making it inadequate for full understanding.

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

Parameters3/5

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

The description adds some meaning beyond the input schema: it lists the asset_type parameter and provides its possible values (hdris, textures, models, all), which the schema lacks (0% coverage with no enums). However, it doesn't explain the semantics of these values (e.g., what 'all' entails) or any constraints, so it only partially compensates for the schema's deficiencies, aligning with the baseline for moderate coverage improvement.

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 it easy to understand what the tool does. However, it doesn't explicitly differentiate from siblings like 'search_polyhaven_assets' or 'get_polyhaven_status', which could provide similar metadata.

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 minimal guidance: it mentions the asset_type parameter but offers no context on when to use this tool versus alternatives. For example, it doesn't clarify if this should be used before searching assets or as a standalone metadata query, nor does it reference sibling tools like 'search_polyhaven_assets' for filtering. This lack of explicit usage scenarios limits its helpfulness.

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