vbot_crud
Manage virtual robots in Unity or VRChat by creating, reading, updating, deleting, and listing them with support for multiple robot types including Scout, Go2, G1, and custom models.
Instructions
CRUD operations for virtual robots (vbots).
This tool provides complete lifecycle management for virtual robots:
Create: Spawn and register a new virtual robot
Read: Get details of an existing virtual robot
Update: Modify virtual robot properties (scale, position, metadata, etc.)
Delete: Remove and unregister a virtual robot
List: List all virtual robots with optional filtering
Supported robot types:
"scout": Moorebot Scout (mecanum wheels, indoor)
"scout_e": Moorebot Scout E (tracked, waterproof, outdoor)
"go2": Unitree Go2 (quadruped)
"g1": Unitree G1 (humanoid with arms)
"robbie": Robbie from Forbidden Planet (classic sci-fi robot)
"custom": Custom robot type (requires model_path)
Args: operation: CRUD operation to perform: - "create": Create/spawn a new virtual robot - "read": Read/get details of an existing virtual robot - "update": Update properties of an existing virtual robot - "delete": Delete/remove a virtual robot - "list": List all virtual robots (optionally filtered) robot_type: Type of robot (required for "create", optional for "list"). Must be one of: "scout", "scout_e", "go2", "g1", "robbie", "custom". robot_id: Virtual robot identifier (required for "read", "update", "delete"). Auto-generated for "create" if not provided. platform: Target platform ("unity" or "vrchat"). Default: "unity". position: Spawn/update position (x, y, z) for "create" or "update". scale: Size multiplier for "create" or "update" (e.g., 1.0 = original size). metadata: Additional metadata dictionary for "create" or "update". model_path: Path to 3D model file (.glb, .fbx, .vrm) for "create" with "custom" robot_type.
Returns: Dictionary containing operation result with robot details.
Examples: Create a Scout vbot: result = await vbot_crud( operation="create", robot_type="scout", platform="unity", position={"x": 0.0, "y": 0.0, "z": 0.0}, scale=1.0 )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| robot_type | No | ||
| robot_id | No | ||
| platform | No | unity | |
| position | No | ||
| scale | No | ||
| metadata | No | ||
| model_path | No |
Input Schema (JSON Schema)
Implementation Reference
- Core execution logic for the 'vbot_crud' tool. Dispatches CRUD operations (create/read/update/delete/list) for virtual robots (vbots) based on the 'operation' parameter. Integrates with Unity/VRChat via mounted MCP servers.@self.mcp.tool() async def vbot_crud( operation: Literal["create", "read", "update", "delete", "list"], robot_type: Optional[str] = None, robot_id: Optional[str] = None, platform: Literal["unity", "vrchat"] = "unity", position: Optional[Dict[str, float]] = None, scale: Optional[float] = None, metadata: Optional[Dict[str, Any]] = None, model_path: Optional[str] = None, ) -> Dict[str, Any]: """CRUD operations for virtual robots (vbots). This tool provides complete lifecycle management for virtual robots: - Create: Spawn and register a new virtual robot - Read: Get details of an existing virtual robot - Update: Modify virtual robot properties (scale, position, metadata, etc.) - Delete: Remove and unregister a virtual robot - List: List all virtual robots with optional filtering Supported robot types: - "scout": Moorebot Scout (mecanum wheels, indoor) - "scout_e": Moorebot Scout E (tracked, waterproof, outdoor) - "go2": Unitree Go2 (quadruped) - "g1": Unitree G1 (humanoid with arms) - "robbie": Robbie from Forbidden Planet (classic sci-fi robot) - "custom": Custom robot type (requires model_path) Args: operation: CRUD operation to perform: - "create": Create/spawn a new virtual robot - "read": Read/get details of an existing virtual robot - "update": Update properties of an existing virtual robot - "delete": Delete/remove a virtual robot - "list": List all virtual robots (optionally filtered) robot_type: Type of robot (required for "create", optional for "list"). Must be one of: "scout", "scout_e", "go2", "g1", "robbie", "custom". robot_id: Virtual robot identifier (required for "read", "update", "delete"). Auto-generated for "create" if not provided. platform: Target platform ("unity" or "vrchat"). Default: "unity". position: Spawn/update position (x, y, z) for "create" or "update". scale: Size multiplier for "create" or "update" (e.g., 1.0 = original size). metadata: Additional metadata dictionary for "create" or "update". model_path: Path to 3D model file (.glb, .fbx, .vrm) for "create" with "custom" robot_type. Returns: Dictionary containing operation result with robot details. Examples: Create a Scout vbot: result = await vbot_crud( operation="create", robot_type="scout", platform="unity", position={"x": 0.0, "y": 0.0, "z": 0.0}, scale=1.0 ) Create Robbie from Forbidden Planet: result = await vbot_crud( operation="create", robot_type="robbie", platform="unity", position={"x": 1.0, "y": 0.0, "z": 1.0}, scale=1.0 ) Read vbot details: result = await vbot_crud( operation="read", robot_id="vbot_scout_01" ) Update vbot scale and position: result = await vbot_crud( operation="update", robot_id="vbot_scout_01", scale=1.5, position={"x": 2.0, "y": 0.0, "z": 2.0} ) Delete a vbot: result = await vbot_crud( operation="delete", robot_id="vbot_scout_01" ) List all vbots: result = await vbot_crud(operation="list") List only Scout vbots: result = await vbot_crud( operation="list", robot_type="scout" ) """ try: if operation == "create": return await self._create_vbot(robot_type, robot_id, platform, position, scale, metadata, model_path) elif operation == "read": return await self._read_vbot(robot_id) elif operation == "update": return await self._update_vbot(robot_id, position, scale, metadata) elif operation == "delete": return await self._delete_vbot(robot_id) elif operation == "list": return await self._list_vbots(robot_type, platform) else: return format_error_response(f"Unknown operation: {operation}", error_type="validation_error") except Exception as e: return handle_tool_error("vbot_crud", e, operation=operation, robot_type=robot_type, robot_id=robot_id)
- List of supported robot types used for validation in create/list operations.SUPPORTED_ROBOT_TYPES = [ "scout", # Moorebot Scout "scout_e", # Moorebot Scout E (tracked, waterproof) "go2", # Unitree Go2 "g1", # Unitree G1 "robbie", # Robbie from Forbidden Planet "custom", # Custom robot type ]
- src/robotics_mcp/server.py:363-363 (registration)Registration call that adds the vbot_crud tool to the MCP server using FastMCP's @tool decorator inside VbotCrudTool.register().self.vbot_crud.register() # Portmanteau: CRUD for virtual robots
- src/robotics_mcp/server.py:128-128 (registration)Instantiation of the VbotCrudTool class instance passed to the main RoboticsMCP server.self.vbot_crud = VbotCrudTool(self.mcp, self.state_manager, self.mounted_servers)
- Helper method for creating a new virtual robot, including validation, state management, and spawning in Unity/VRChat.async def _create_vbot( self, robot_type: Optional[str], robot_id: Optional[str], platform: str, position: Optional[Dict[str, float]], scale: Optional[float], metadata: Optional[Dict[str, Any]], model_path: Optional[str], ) -> Dict[str, Any]: """Create/spawn a new virtual robot.""" if not robot_type: return format_error_response("robot_type is required for create operation", error_type="validation_error") if robot_type not in SUPPORTED_ROBOT_TYPES: return format_error_response( f"Unsupported robot_type: {robot_type}. Supported types: {', '.join(SUPPORTED_ROBOT_TYPES)}", error_type="validation_error", ) if robot_type == "custom" and not model_path: return format_error_response( "model_path is required for custom robot_type", error_type="validation_error" ) # Generate robot_id if not provided if not robot_id: robot_id = f"vbot_{robot_type}_{len(self.state_manager.list_robots(is_virtual=True)) + 1:02d}" # Check if robot_id already exists if self.state_manager.get_robot(robot_id): return format_error_response(f"Robot {robot_id} already exists", error_type="validation_error") # Default position if position is None: position = {"x": 0.0, "y": 0.0, "z": 0.0} # Default scale if scale is None: scale = 1.0 # Prepare metadata vbot_metadata = { "spawned": True, "platform": platform, "position": position, "scale": scale, "model_path": model_path, **(metadata or {}), } # Register robot in state manager try: robot = self.state_manager.register_robot(robot_id, robot_type, platform=platform, metadata=vbot_metadata) except ValueError as e: return format_error_response(str(e), error_type="validation_error") # Spawn in Unity/VRChat via mounted servers spawn_result = await self._spawn_in_platform(robot_id, robot_type, platform, position, scale, model_path) if spawn_result.get("status") != "success": # Cleanup registration if spawn failed self.state_manager.unregister_robot(robot_id) return spawn_result return format_success_response( f"Virtual robot {robot_id} created successfully", data={ "robot_id": robot_id, "robot_type": robot_type, "platform": platform, "position": position, "scale": scale, "metadata": vbot_metadata, }, robot_id=robot_id, )