robot_model
Create, import, export, and convert robot 3D models for Unity, VRChat, and Resonite platforms using a single unified interface.
Instructions
Robot model management portmanteau for Robotics MCP.
PORTMANTEAU PATTERN RATIONALE: Instead of creating 4 separate tools (create, import, export, convert), this tool consolidates related model operations into a single interface. This design:
Prevents tool explosion (4 tools โ 1 tool) while maintaining full functionality
Improves discoverability by grouping related operations together
Reduces cognitive load when working with robot models
Enables consistent model interface across all operations
Follows FastMCP 2.13+ best practices for feature-rich MCP servers
SUPPORTED OPERATIONS:
create: Create robot 3D model from scratch using Blender MCP
import: Import robot 3D model into Unity/VRChat/Resonite project
export: Export robot model from Unity to file format
convert: Convert robot model between formats
Args: operation: The model operation to perform. MUST be one of: - "create": Create model (requires: robot_type, output_path) - "import": Import model (requires: robot_type, model_path) - "export": Export model (requires: robot_id) - "convert": Convert model (requires: source_path, source_format, target_format)
Returns: Dictionary containing operation-specific results.
Examples: Create Scout model: result = await robot_model( operation="create", robot_type="scout", output_path="D:/Models/scout_model.fbx", format="fbx" )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| robot_type | No | ||
| model_path | No | ||
| output_path | No | ||
| format | No | fbx | |
| platform | No | unity | |
| dimensions | No | ||
| create_textures | No | ||
| texture_style | No | realistic | |
| robot_id | No | ||
| include_animations | No | ||
| project_path | No | ||
| create_prefab | No | ||
| source_path | No | ||
| source_format | No | ||
| target_format | No | ||
| target_path | No |
Input Schema (JSON Schema)
Implementation Reference
- The core handler function for the 'robot_model' tool. This portmanteau function handles four operations (create, import, export, convert) by dispatching to private helper methods. Includes full input schema via typed parameters and comprehensive validation.@self.mcp.tool() async def robot_model( operation: Literal["create", "import", "export", "convert"], robot_type: Optional[str] = None, model_path: Optional[str] = None, output_path: Optional[str] = None, format: Literal["fbx", "glb", "obj", "vrm", "blend"] = "fbx", platform: Literal["unity", "vrchat", "resonite"] = "unity", dimensions: Optional[Dict[str, float]] = None, create_textures: bool = True, texture_style: Literal["realistic", "stylized", "simple"] = "realistic", robot_id: Optional[str] = None, include_animations: bool = True, project_path: Optional[str] = None, create_prefab: bool = True, source_path: Optional[str] = None, source_format: Optional[Literal["fbx", "glb", "obj", "blend", "vrm"]] = None, target_format: Optional[Literal["fbx", "glb", "obj", "vrm"]] = None, target_path: Optional[str] = None, ) -> Dict[str, Any]: """Robot model management portmanteau for Robotics MCP. PORTMANTEAU PATTERN RATIONALE: Instead of creating 4 separate tools (create, import, export, convert), this tool consolidates related model operations into a single interface. This design: - Prevents tool explosion (4 tools โ 1 tool) while maintaining full functionality - Improves discoverability by grouping related operations together - Reduces cognitive load when working with robot models - Enables consistent model interface across all operations - Follows FastMCP 2.13+ best practices for feature-rich MCP servers SUPPORTED OPERATIONS: - create: Create robot 3D model from scratch using Blender MCP - import: Import robot 3D model into Unity/VRChat/Resonite project - export: Export robot model from Unity to file format - convert: Convert robot model between formats Args: operation: The model operation to perform. MUST be one of: - "create": Create model (requires: robot_type, output_path) - "import": Import model (requires: robot_type, model_path) - "export": Export model (requires: robot_id) - "convert": Convert model (requires: source_path, source_format, target_format) robot_type: Type of robot (required for create/import). Examples: "scout", "go2", "g1", "robbie", "custom" model_path: Path to model file (required for import). output_path: Path for output file (required for create, optional for export/convert). format: Model format (used by create/import/export). - "fbx": Industry standard (recommended for robots) - "glb": Modern glTF 2.0 format - "obj": Simple mesh format - "vrm": VRM format (ONLY for humanoid robots) platform: Target platform for import (unity/vrchat/resonite). dimensions: Custom dimensions for create (length, width, height in meters). create_textures: Create textures using gimp-mcp (for create). texture_style: Texture style for create (realistic/stylized/simple). robot_id: Virtual robot identifier (required for export). include_animations: Include animations in export. project_path: Unity project path (for import). create_prefab: Create Unity prefab after import. source_path: Source file path (required for convert). source_format: Source file format (required for convert). target_format: Target file format (required for convert). target_path: Output file path (optional for convert). Returns: Dictionary containing operation-specific results. Examples: Create Scout model: result = await robot_model( operation="create", robot_type="scout", output_path="D:/Models/scout_model.fbx", format="fbx" ) Import model to Unity: result = await robot_model( operation="import", robot_type="scout", model_path="D:/Models/scout_model.fbx", platform="unity" ) Export robot from Unity: result = await robot_model( operation="export", robot_id="vbot_scout_01", format="fbx" ) Convert FBX to GLB: result = await robot_model( operation="convert", source_path="D:/Models/scout.fbx", source_format="fbx", target_format="glb" ) """ try: if operation == "create": if not robot_type or not output_path: return format_error_response( "robot_type and output_path are required for 'create' operation", error_type="validation_error", ) return await self._handle_create( robot_type, output_path, format, dimensions, create_textures, texture_style ) elif operation == "import": if not robot_type or not model_path: return format_error_response( "robot_type and model_path are required for 'import' operation", error_type="validation_error", ) return await self._handle_import(robot_type, model_path, format, platform, project_path, create_prefab) elif operation == "export": if not robot_id: return format_error_response( "robot_id is required for 'export' operation", error_type="validation_error", ) return await self._handle_export(robot_id, format, output_path, include_animations) elif operation == "convert": if not source_path or not source_format or not target_format: return format_error_response( "source_path, source_format, and target_format are required for 'convert' operation", error_type="validation_error", ) return await self._handle_convert(source_path, source_format, target_format, target_path, robot_type) else: return format_error_response(f"Unknown operation: {operation}", error_type="validation_error") except Exception as e: return handle_tool_error("robot_model", e, operation=operation)
- src/robotics_mcp/server.py:364-364 (registration)Registers the robot_model tool by calling the register() method on the RobotModelTools instance during server initialization.self.robot_model_tools.register() # Portmanteau: create, import, export, convert
- src/robotics_mcp/server.py:129-129 (registration)Instantiates the RobotModelTools class, which contains the robot_model tool logic, passing MCP server, state manager, and mounted servers.self.robot_model_tools = RobotModelTools(self.mcp, self.state_manager, self.mounted_servers)
- Input schema defined by the function parameters with Literal types for enums, Optionals, and defaults, covering all operations.operation: Literal["create", "import", "export", "convert"], robot_type: Optional[str] = None, model_path: Optional[str] = None, output_path: Optional[str] = None, format: Literal["fbx", "glb", "obj", "vrm", "blend"] = "fbx", platform: Literal["unity", "vrchat", "resonite"] = "unity", dimensions: Optional[Dict[str, float]] = None, create_textures: bool = True, texture_style: Literal["realistic", "stylized", "simple"] = "realistic", robot_id: Optional[str] = None, include_animations: bool = True, project_path: Optional[str] = None, create_prefab: bool = True, source_path: Optional[str] = None, source_format: Optional[Literal["fbx", "glb", "obj", "blend", "vrm"]] = None, target_format: Optional[Literal["fbx", "glb", "obj", "vrm"]] = None, target_path: Optional[str] = None, ) -> Dict[str, Any]:
- Helper method providing default dimensions for different robot types, used in create operation.def _get_default_dimensions(self, robot_type: str) -> Dict[str, float]: """Get default dimensions for robot type (in meters).""" defaults = { "scout": {"length": 0.115, "width": 0.10, "height": 0.08}, # 11.5ร10ร8 cm "scout_e": {"length": 0.12, "width": 0.11, "height": 0.09}, # Slightly larger "go2": {"length": 0.50, "width": 0.30, "height": 0.40}, # Quadruped "g1": {"length": 0.50, "width": 0.40, "height": 1.60}, # Humanoid "robbie": {"length": 0.60, "width": 0.50, "height": 1.80}, # Humanoid robot } return defaults.get(robot_type, {"length": 0.2, "width": 0.15, "height": 0.12}) # Default custom size