Skip to main content
Glama

get_scene_info

Retrieve detailed information about the current Blender scene, including objects, materials, and settings for AI-assisted 3D modeling workflows.

Instructions

Get detailed information about the current Blender scene

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for the 'get_scene_info' MCP tool. It is decorated with @mcp.tool() for registration, uses get_blender_connection() to communicate with Blender via send_command('get_scene_info'), and returns the scene information as formatted JSON or an error message. The docstring provides the tool description serving as schema.
    @mcp.tool()
    def get_scene_info(ctx: Context) -> str:
        """Get detailed information about the current Blender scene"""
        try:
            blender = get_blender_connection()
            result = blender.send_command("get_scene_info")
            
            # Just return the JSON representation of what Blender sent us
            return json.dumps(result, indent=2)
        except Exception as e:
            logger.error(f"Error getting scene info from Blender: {str(e)}")
            return f"Error getting scene info: {str(e)}"
  • Usage instruction in the asset_creation_strategy prompt that recommends calling get_scene_info() first to check the current scene state.
    0. Before anything, always check the scene from get_scene_info()
  • Helper function get_blender_connection() used by the tool handler to obtain a connection to the Blender server.
    def get_blender_connection():
        """Get or create a persistent Blender connection"""
        global _blender_connection, _polyhaven_enabled  # Add _polyhaven_enabled to globals
        
        # If we have an existing connection, check if it's still valid
        if _blender_connection is not None:
            try:
                # First check if PolyHaven is enabled by sending a ping command
                result = _blender_connection.send_command("get_polyhaven_status")
                # Store the PolyHaven status globally
                _polyhaven_enabled = result.get("enabled", False)
                return _blender_connection
            except Exception as e:
                # Connection is dead, close it and create a new one
                logger.warning(f"Existing connection is no longer valid: {str(e)}")
                try:
                    _blender_connection.disconnect()
                except:
                    pass
                _blender_connection = None
        
        # Create a new connection if needed
        if _blender_connection is None:
            host = os.getenv("BLENDER_HOST", DEFAULT_HOST)
            port = int(os.getenv("BLENDER_PORT", DEFAULT_PORT))
            _blender_connection = BlenderConnection(host=host, port=port)
            if not _blender_connection.connect():
                logger.error("Failed to connect to Blender")
                _blender_connection = None
                raise Exception("Could not connect to Blender. Make sure the Blender addon is running.")
            logger.info("Created new persistent connection to Blender")

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.0
    • addedInput schema / title
      Added value: +"get_scene_infoArguments"
  2. First observed

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description must carry the full behavioral burden. 'Get' weakly implies a read-only operation, but it does not disclose what 'detailed information' contains, whether it errors under certain conditions, or whether it requires a valid Blender context. It provides very little beyond the tool name itself.

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?

A single clear sentence with no filler or redundancy. The key components—verb, resource, and scope—are all present and front-loaded. Nothing extra needs to be trimmed.

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

Completeness2/5

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

This is a zero-parameter tool with no annotations and no output schema, so the description is the only source of behavioral and return-value information. Saying only 'detailed information' leaves the agent uncertain about what fields or values will be returned, making the definition incomplete for a tool that provides scene info.

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 input schema is empty, so there are no parameters to document. With a parameter count of 0, the baseline of 4 is appropriate because no parameter meaning needs to be added by the description.

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 states a clear verb ('Get') and resource ('current Blender scene'), making the basic purpose understandable. However, 'detailed information' is vague about exactly what scene data is included, and it does not explicitly differentiate from get_object_info, though scene vs. object is an implied distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The context is implied: use this when you need detailed scene-level information. But there is no guidance on when not to use it, no mention of alternatives like get_object_info, and no prerequisites such as requiring an open Blender scene or active session.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.