Skip to main content
Glama

set_texture

Apply Polyhaven textures to 3D objects in Blender by specifying the object name and texture ID to enhance visual appearance.

Instructions

Apply a previously downloaded Polyhaven texture to an object.

Parameters:

  • object_name: Name of the object to apply the texture to

  • texture_id: ID of the Polyhaven texture to apply (must be downloaded first)

Returns a message indicating success or failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
object_nameYes
texture_idYes

Implementation Reference

  • The `set_texture` tool handler which sends the command to the Blender instance.
    @mcp.tool()
    def set_texture(
        ctx: Context,
        object_name: str,
        texture_id: str
    ) -> str:
        """
        Apply a previously downloaded Polyhaven texture to an object.
        
        Parameters:
        - object_name: Name of the object to apply the texture to
        - texture_id: ID of the Polyhaven texture to apply (must be downloaded first)
        
        Returns a message indicating success or failure.
        """
        try:
            # Get the global connection
            blender = get_blender_connection()
            result = blender.send_command("set_texture", {
                "object_name": object_name,
                "texture_id": texture_id
            })
            
            if "error" in result:
                return f"Error: {result['error']}"
            
            if result.get("success"):
                material_name = result.get("material", "")
                maps = ", ".join(result.get("maps", []))
                
                # Add detailed material info
                material_info = result.get("material_info", {})
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses the mutation (applying texture) and return value type ('message indicating success or failure'), but omits whether this overwrites existing materials, is reversible, or error conditions when object doesn't exist.

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?

Excellent structure with front-loaded purpose statement, bulleted parameter explanations, and return value disclosure. No redundant words; every sentence earns its place. Appropriate length for a 2-parameter tool.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for the tool's complexity (simple 2-param mutation). Without output schema, the description appropriately discloses the return type. Lacks annotations but covers basic behavioral expectations. Could mention error cases for missing objects.

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?

Schema has 0% description coverage, but the description compensates well by documenting both parameters inline: object_name purpose and texture_id with its 'must be downloaded first' constraint. Could improve by specifying ID format or valid object naming conventions.

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?

Clear specific verb 'Apply' with resource 'Polyhaven texture' and target 'object'. Explicitly scopes to Polyhaven textures and distinguishes from sibling download_polyhaven_asset by stating this operates on 'previously downloaded' assets.

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?

States prerequisite constraint that texture 'must be downloaded first', implying the workflow sequence. However, it doesn't explicitly name download_polyhaven_asset as the prerequisite step or mention alternatives like generating textures via other methods.

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

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