Skip to main content
Glama
mikeysrecipes

BlenderMCP

get_polyhaven_status

Check if PolyHaven integration is enabled in Blender to verify availability of PolyHaven features for 3D modeling and scene creation.

Instructions

Check if PolyHaven integration is enabled in Blender. Returns a message indicating whether PolyHaven features are available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler for the 'get_polyhaven_status' tool. Decorated with @mcp.tool() for registration. Sends a command to the Blender connection to retrieve PolyHaven status and formats the response.
    @mcp.tool()
    def get_polyhaven_status(ctx: Context) -> str:
        """
        Check if PolyHaven integration is enabled in Blender.
        Returns a message indicating whether PolyHaven features are available.
        """
        try:
            blender = get_blender_connection()
            result = blender.send_command("get_polyhaven_status")
            enabled = result.get("enabled", False)
            message = result.get("message", "")
            if enabled:
                message += "PolyHaven is good at Textures, and has a wider variety of textures than Sketchfab."
            return message
        except Exception as e:
            logger.error(f"Error checking PolyHaven status: {str(e)}")
            return f"Error checking PolyHaven status: {str(e)}"
  • The @mcp.tool() decorator registers the get_polyhaven_status function as an MCP tool.
    @mcp.tool()
  • Helper function get_blender_connection() that uses get_polyhaven_status to validate connection and cache PolyHaven enabled status.
    def get_blender_connection():
        """Get or create a persistent Blender connection"""
        global _blender_connection, _polyhaven_enabled  # Add _polyhaven_enabled to globals
        
        # If we have an existing connection, check if it's still valid
        if _blender_connection is not None:
            try:
                # First check if PolyHaven is enabled by sending a ping command
                result = _blender_connection.send_command("get_polyhaven_status")
                # Store the PolyHaven status globally
                _polyhaven_enabled = result.get("enabled", False)
                return _blender_connection
            except Exception as e:
                # Connection is dead, close it and create a new one
                logger.warning(f"Existing connection is no longer valid: {str(e)}")
                try:
                    _blender_connection.disconnect()
                except:
                    pass
                _blender_connection = None
        
        # Create a new connection if needed
        if _blender_connection is None:
            _blender_connection = BlenderConnection(host="localhost", port=9876)
            if not _blender_connection.connect():
                logger.error("Failed to connect to Blender")
                _blender_connection = None
                raise Exception("Could not connect to Blender. Make sure the Blender addon is running.")
            logger.info("Created new persistent connection to Blender")
        
        return _blender_connection
  • The asset_creation_strategy prompt recommends using get_polyhaven_status() to check PolyHaven availability before asset creation.
    @mcp.prompt()
    def asset_creation_strategy() -> str:
        """Defines the preferred strategy for creating assets in Blender"""
        return """When creating 3D content in Blender, always start by checking if integrations are available:
    
        0. Before anything, always check the scene from get_scene_info()
        1. First use the following tools to verify if the following integrations are enabled:
            1. PolyHaven
                Use get_polyhaven_status() to verify its status
                If PolyHaven is enabled:
                - 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"
            2. Sketchfab
                Sketchfab is good at Realistic models, and has a wider variety of models than PolyHaven.
                Use get_sketchfab_status() to verify its status
                If Sketchfab is enabled:
                - For objects/models: First search using search_sketchfab_models() with your query
                - Then download specific models using download_sketchfab_model() with the UID
                - Note that only downloadable models can be accessed, and API key must be properly configured
                - Sketchfab has a wider variety of models than PolyHaven, especially for specific subjects
            3. Hyper3D(Rodin)
                Hyper3D Rodin is good at generating 3D models for single item.
                So don't try to:
                1. Generate the whole scene with one shot
                2. Generate ground using Hyper3D
                3. Generate parts of the items separately and put them together afterwards
    
                Use get_hyper3d_status() to verify its status
                If Hyper3D is enabled:
                - For objects/models, do the following steps:
                    1. Create the model generation task
                        - Use generate_hyper3d_model_via_images() if image(s) is/are given
                        - Use generate_hyper3d_model_via_text() if generating 3D asset using text prompt
                        If key type is free_trial and insufficient balance error returned, tell the user that the free trial key can only generated limited models everyday, they can choose to:
                        - Wait for another day and try again
                        - Go to hyper3d.ai to find out how to get their own API key
                        - Go to fal.ai to get their own private API key
                    2. Poll the status
                        - Use poll_rodin_job_status() to check if the generation task has completed or failed
                    3. Import the asset
                        - Use import_generated_asset() to import the generated GLB model the asset
                    4. After importing the asset, ALWAYS check the world_bounding_box of the imported mesh, and adjust the mesh's location and size
                        Adjust the imported mesh's location, scale, rotation, so that the mesh is on the right spot.
    
                    You can reuse assets previous generated by running python code to duplicate the object, without creating another generation task.
    
        3. Always check the world_bounding_box for each item so that:
            - Ensure that all objects that should not be clipping are not clipping.
            - Items have right spatial relationship.
        
        4. Recommended asset source priority:
            - For specific existing objects: First try Sketchfab, then PolyHaven
            - For generic objects/furniture: First try PolyHaven, then Sketchfab
            - For custom or unique items not available in libraries: Use Hyper3D Rodin
            - For environment lighting: Use PolyHaven HDRIs
            - For materials/textures: Use PolyHaven textures
    
        Only fall back to scripting when:
        - PolyHaven, Sketchfab, and Hyper3D are all disabled
        - A simple primitive is explicitly requested
        - No suitable asset exists in any of the libraries
        - Hyper3D Rodin failed to generate the desired asset
        - The task specifically requires a basic material/color
        """
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 'Returns a message indicating whether PolyHaven features are available,' which implies a read-only, non-destructive operation. However, it lacks details on potential errors (e.g., if Blender isn't accessible), response format specifics, or any side effects. 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 highly concise and well-structured, consisting of two sentences that directly state the purpose and return value. Every sentence earns its place by providing essential information without redundancy or fluff, making it easy to parse and understand quickly.

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 simplicity (0 parameters, no annotations, no output schema), the description is minimally adequate. It covers the basic purpose and return indication, which is sufficient for a status-check tool. However, it lacks context about integration requirements or error handling, leaving gaps that could hinder an agent in edge cases. This meets the minimum viable standard but isn't comprehensive.

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 tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description doesn't need to explain parameters, so it appropriately avoids this. A baseline of 4 is applied for zero-parameter tools, as the description focuses on the tool's purpose without unnecessary parameter details.

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: 'Check if PolyHaven integration is enabled in Blender.' This specifies the verb ('Check') and resource ('PolyHaven integration in Blender'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_hyper3d_status' or 'get_sketchfab_status' beyond the resource name, which prevents a perfect score.

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 doesn't mention prerequisites (e.g., whether Blender must be running), exclusions, or comparisons to similar tools like 'get_hyper3d_status' or 'get_sketchfab_status'. The agent must infer usage from the purpose alone, which is insufficient for effective tool selection.

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

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