Skip to main content
Glama
ujs204

BlenderMCP

by ujs204

search_sketchfab_models

Find and filter 3D models from Sketchfab for use in Blender projects. Search by keywords, categories, and downloadability to import assets directly into your 3D scenes.

Instructions

Search for models on Sketchfab with optional filtering.

Parameters:

  • query: Text to search for

  • categories: Optional comma-separated list of categories

  • count: Maximum number of results to return (default 20)

  • downloadable: Whether to include only downloadable models (default True)

Returns a formatted list of matching models.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
categoriesNo
countNo
downloadableNo

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the search_sketchfab_models tool. It forwards the search parameters to the Blender addon via send_command and formats the returned model results into a readable string.
    @mcp.tool()
    def search_sketchfab_models(
        ctx: Context,
        query: str,
        categories: str = None,
        count: int = 20,
        downloadable: bool = True
    ) -> str:
        """
        Search for models on Sketchfab with optional filtering.
        
        Parameters:
        - query: Text to search for
        - categories: Optional comma-separated list of categories
        - count: Maximum number of results to return (default 20)
        - downloadable: Whether to include only downloadable models (default True)
        
        Returns a formatted list of matching models.
        """
        try:
            
            blender = get_blender_connection()
            logger.info(f"Searching Sketchfab models with query: {query}, categories: {categories}, count: {count}, downloadable: {downloadable}")
            result = blender.send_command("search_sketchfab_models", {
                "query": query,
                "categories": categories,
                "count": count,
                "downloadable": downloadable
            })
            
            if "error" in result:
                logger.error(f"Error from Sketchfab search: {result['error']}")
                return f"Error: {result['error']}"
            
            # Safely get results with fallbacks for None
            if result is None:
                logger.error("Received None result from Sketchfab search")
                return "Error: Received no response from Sketchfab search"
                
            # Format the results
            models = result.get("results", []) or []
            if not models:
                return f"No models found matching '{query}'"
                
            formatted_output = f"Found {len(models)} models matching '{query}':\n\n"
            
            for model in models:
                if model is None:
                    continue
                    
                model_name = model.get("name", "Unnamed model")
                model_uid = model.get("uid", "Unknown ID")
                formatted_output += f"- {model_name} (UID: {model_uid})\n"
                
                # Get user info with safety checks
                user = model.get("user") or {}
                username = user.get("username", "Unknown author") if isinstance(user, dict) else "Unknown author"
                formatted_output += f"  Author: {username}\n"
                
                # Get license info with safety checks
                license_data = model.get("license") or {}
                license_label = license_data.get("label", "Unknown") if isinstance(license_data, dict) else "Unknown"
                formatted_output += f"  License: {license_label}\n"
                
                # Add face count and downloadable status
                face_count = model.get("faceCount", "Unknown")
                is_downloadable = "Yes" if model.get("isDownloadable") else "No"
                formatted_output += f"  Face count: {face_count}\n"
                formatted_output += f"  Downloadable: {is_downloadable}\n\n"
            
            return formatted_output
        except Exception as e:
            logger.error(f"Error searching Sketchfab models: {str(e)}")
            import traceback
            logger.error(traceback.format_exc())
            return f"Error searching Sketchfab models: {str(e)}"
  • The function signature and docstring define the input schema (parameters: query, categories, count, downloadable) and output (str describing search results).
    def search_sketchfab_models(
        ctx: Context,
        query: str,
        categories: str = None,
        count: int = 20,
        downloadable: bool = True
    ) -> str:
        """
        Search for models on Sketchfab with optional filtering.
        
        Parameters:
        - query: Text to search for
        - categories: Optional comma-separated list of categories
        - count: Maximum number of results to return (default 20)
        - downloadable: Whether to include only downloadable models (default True)
        
        Returns a formatted list of matching models.
        """
  • The @mcp.tool() decorator registers this function as an MCP tool.
    @mcp.tool()
  • Usage instruction in the asset_creation_strategy prompt encouraging use of search_sketchfab_models for finding models on Sketchfab.
    - For objects/models: First search using search_sketchfab_models() with your query
    - Then download specific models using download_sketchfab_model() with the UID
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 mentions that the tool 'Returns a formatted list of matching models,' which gives some output context, but lacks critical details like whether this is a read-only operation, potential rate limits, authentication needs, error handling, or pagination behavior. For a search tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 appropriately sized and front-loaded: it starts with a clear purpose statement, followed by a bulleted list of parameters with concise explanations, and ends with the return value. Every sentence earns its place without redundancy, making it easy for an agent to parse 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 moderate complexity (4 parameters, no annotations, no output schema), the description is partially complete. It covers the purpose and parameters well but lacks behavioral context (e.g., safety, limits) and detailed output information beyond 'formatted list.' For a search tool, this is adequate but leaves gaps that could hinder optimal agent use, especially without annotations to fill in behavioral aspects.

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 substantial value beyond the input schema, which has 0% schema description coverage. It explains each parameter's purpose: 'query' as 'Text to search for,' 'categories' as 'Optional comma-separated list of categories,' 'count' with its default and meaning, and 'downloadable' with its default and filter intent. This compensates well for the schema's lack of descriptions, though it doesn't detail format specifics like valid category values.

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 models on Sketchfab with optional filtering.' This specifies the verb ('search'), resource ('models on Sketchfab'), and scope ('with optional filtering'). However, it doesn't explicitly differentiate from sibling tools like 'search_polyhaven_assets' beyond the platform name, which is why it doesn't reach a perfect 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 doesn't mention sibling tools like 'search_polyhaven_assets' for different platforms or 'download_sketchfab_model' for subsequent actions. There's no context about prerequisites, limitations, or typical use cases, leaving the agent with minimal usage 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/ujs204/CLAUDE-BLENDER-MCP'

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