Skip to main content
Glama
ujs204

BlenderMCP

by ujs204

get_viewport_screenshot

Capture a screenshot of the current Blender 3D viewport to document or share your scene progress. Returns the image with adjustable maximum size.

Instructions

Capture a screenshot of the current Blender 3D viewport.

Parameters:

  • max_size: Maximum size in pixels for the largest dimension (default: 800)

Returns the screenshot as an Image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_sizeNo

Implementation Reference

  • The handler function for the 'get_viewport_screenshot' tool, decorated with @mcp.tool() for registration. It captures the Blender 3D viewport screenshot by commanding the Blender addon via socket connection, saving to a temporary PNG file, reading the image bytes, cleaning up the temp file, and returning an MCP Image object. The input schema is defined by the parameter max_size (int, default 800), and output by return type Image, documented in the docstring.
    @mcp.tool()
    def get_viewport_screenshot(ctx: Context, max_size: int = 800) -> Image:
        """
        Capture a screenshot of the current Blender 3D viewport.
        
        Parameters:
        - max_size: Maximum size in pixels for the largest dimension (default: 800)
        
        Returns the screenshot as an Image.
        """
        try:
            blender = get_blender_connection()
            
            # Create temp file path
            temp_dir = tempfile.gettempdir()
            temp_path = os.path.join(temp_dir, f"blender_screenshot_{os.getpid()}.png")
            
            result = blender.send_command("get_viewport_screenshot", {
                "max_size": max_size,
                "filepath": temp_path,
                "format": "png"
            })
            
            if "error" in result:
                raise Exception(result["error"])
            
            if not os.path.exists(temp_path):
                raise Exception("Screenshot file was not created")
            
            # Read the file
            with open(temp_path, 'rb') as f:
                image_bytes = f.read()
            
            # Delete the temp file
            os.remove(temp_path)
            
            return Image(data=image_bytes, format="png")
            
        except Exception as e:
            logger.error(f"Error capturing screenshot: {str(e)}")
            raise Exception(f"Screenshot failed: {str(e)}")
Behavior2/5

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

No annotations are provided, so the description carries full burden. It discloses that the tool captures a screenshot and returns an Image, but lacks critical behavioral details: whether it requires specific Blender state (e.g., an active 3D view), if it's read-only or has side effects (e.g., pauses rendering), performance implications, or error conditions (e.g., if no viewport exists). The description is minimal beyond the basic action.

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: the first sentence states the core purpose, followed by a clear parameter section and return statement. Every sentence adds value without redundancy, and the structure is easy to parse.

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 no annotations, no output schema, and low schema coverage (0%), the description is minimally complete for a simple tool. It covers the purpose, parameter semantics, and return type, but lacks behavioral context (e.g., dependencies, side effects) and detailed output information (e.g., image format, dimensions). For a screenshot tool in a Blender context, more guidance on usage and constraints would be beneficial.

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 description coverage is 0%, so the description must compensate. It adds meaningful context for the single parameter 'max_size', explaining it as 'Maximum size in pixels for the largest dimension' with a default value, which clarifies its purpose beyond the schema's title 'Max Size'. However, it does not detail constraints (e.g., minimum/maximum values) or effects on image quality.

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?

The description clearly states the specific action ('Capture a screenshot') and the target resource ('current Blender 3D viewport'), distinguishing it from all sibling tools which involve downloading assets, executing code, getting status/info, importing, searching, or setting textures. No tautology or vagueness present.

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 does not mention prerequisites (e.g., Blender must be running with a viewport open), exclusions, or compare it to similar tools (none exist among siblings, but context about other screenshot methods is absent). Usage is implied only by the purpose statement.

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