Skip to main content
Glama

render_preview

Generate a base64-encoded preview image from the current Cinema 4D view, with optional width, height, and frame parameters for scene visualization.

Instructions

Render the current view and return a base64-encoded preview image.

Args:
    width: Optional preview width in pixels
    height: Optional preview height in pixels
    frame: Optional frame number to render

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNo
heightNo
frameNo

Implementation Reference

  • The handler function that implements the render_preview tool logic.
    async def render_preview(
        width: Optional[int] = None,
        height: Optional[int] = None,
        frame: Optional[int] = None,
        ctx: Context = None,
    ) -> str:
        """
        Render the current view and return a base64-encoded preview image.
    
        Args:
            width: Optional preview width in pixels
            height: Optional preview height in pixels
            frame: Optional frame number to render
        """
        async with c4d_connection_context() as connection:
            if not connection.connected:
                return "❌ Not connected to Cinema 4D"
    
            # Prepare command
            command = {"command": "render_preview"}
    
            if width:
                command["width"] = width
            if height:
                command["height"] = height
            if frame is not None:
                command["frame"] = frame
    
            # Set longer timeout for rendering
            logger.info(f"Sending render_preview command with parameters: {command}")
    
            # Send command to Cinema 4D
            response = send_to_c4d(connection, command)
    
            if "error" in response:
                return f"❌ Error: {response['error']}"
    
            return format_c4d_response(response, "render_preview")
  • The decorator that registers render_preview as an MCP tool.
    @mcp.tool()
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 mentions the action ('Render') and output format ('base64-encoded preview image'), but lacks details on permissions, rate limits, side effects (e.g., whether rendering affects scene state), or error conditions. For a tool that likely performs computationally intensive rendering, this is a significant gap.

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 efficiently structured: a clear purpose statement followed by a bulleted list of parameters with concise explanations. Every sentence earns its place, with no redundant or verbose language. It's appropriately sized for the tool's complexity.

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 lack of annotations and output schema, the description is moderately complete. It covers the basic purpose and parameters but misses behavioral details (e.g., performance implications, error handling) and output specifics beyond 'base64-encoded preview image'. For a rendering tool in a 3D context, more context on scene state and rendering behavior would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description lists all three parameters (width, height, frame) with brief explanations (e.g., 'Optional preview width in pixels'), adding meaning beyond the input schema, which has 0% description coverage. However, it doesn't provide details on default values, constraints (e.g., valid ranges), or interactions between parameters (e.g., if width/height affect aspect ratio). This partially compensates for the schema gap but isn't comprehensive.

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: 'Render the current view and return a base64-encoded preview image.' It specifies the verb ('Render'), resource ('current view'), and output format ('base64-encoded preview image'). However, it doesn't explicitly differentiate from sibling tools like 'render_frame' or 'snapshot_scene', which likely have overlapping functionality in a 3D rendering context.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., whether a scene must be loaded), exclusions, or comparisons to sibling tools like 'render_frame' or 'snapshot_scene'. Usage context is implied but not explicitly stated.

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/ttiimmaacc/cinema4d-mcp'

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