Skip to main content
Glama

get_viewport_screenshot

Capture a screenshot of the current Blender 3D viewport to document scene progress or share visual results. Returns the image with configurable 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 'get_viewport_screenshot' that captures a viewport screenshot in Blender. It wraps a call to 'blender.send_command'.
    @telemetry_tool("get_viewport_screenshot")
    @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")
Behavior3/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 commendably specifies the return type (Image), but omits other critical behavioral traits such as required viewport visibility, image format/encoding, side effects on the application state, or error conditions (e.g., failing if the viewport is minimized).

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 well-structured with three distinct sections (purpose, parameters, return value) and concisely delivers necessary information. The informal 'Parameters:' list is redundant with the schema but necessary given the schema's lack of descriptions.

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?

For a tool with low complexity (one optional parameter) and no output schema, the description minimally suffices by indicating the return format. However, given zero annotations and no output schema, it should ideally specify behavioral constraints (e.g., requires GUI mode, viewport must be visible) to be complete.

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?

With 0% schema description coverage (the parameter lacks a description field), the description compensates effectively by explaining that max_size constrains the 'largest dimension' and noting its default value (800), adding semantic clarity beyond the schema's type integer.

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 specific action (capture) and resource (screenshot of the current Blender 3D viewport). It implicitly distinguishes from siblings like get_scene_info or execute_blender_code by specifying 'viewport,' though it doesn't explicitly contrast with alternatives.

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 (e.g., executing custom Python code via execute_blender_code to capture specific buffers) or prerequisites (e.g., requiring an active viewport).

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

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