Skip to main content
Glama

list_objects

Retrieve all objects in the current Cinema 4D scene to manage 3D models and scene hierarchy for AI-assisted modeling workflows.

Instructions

List all objects in the current Cinema 4D scene.

If this tool returns a validation error, use execute_python_script as a fallback
to traverse the object hierarchy manually via the c4d API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function `list_objects` that interacts with Cinema 4D via a connection to retrieve objects.
    async def list_objects(ctx: Context) -> str:
        """List all objects in the current Cinema 4D scene.
    
        If this tool returns a validation error, use execute_python_script as a fallback
        to traverse the object hierarchy manually via the c4d API.
        """
        async with c4d_connection_context() as connection:
            if not connection.connected:
                return "❌ Not connected to Cinema 4D"
    
            response = send_to_c4d(connection, {"command": "list_objects"})
            return format_c4d_response(response, "list_objects")
  • Formatting logic for the `list_objects` response, located within the `format_c4d_response` helper function.
    elif command_type == "list_objects":
        objects = response.get("objects", [])
        if not objects:
            return "Scene is empty — no objects found."
        lines = [f"📦 **Scene Objects** ({len(objects)} total)"]
        for obj in objects:
            indent = "  " * obj.get("depth", 0)
            lines.append(f"  {indent}- **{obj['name']}** ({obj.get('type', '?')})")

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