move_items_to_grid_container_by_column
Moves items to a grid container by filling positions column by column, enabling specific experimental layouts with automatic positioning that fills down columns before moving to the next column.
Instructions
Moves items to grid container, filling positions column by column
Usage: Alternative filling pattern for specific experimental layouts Auto-positioning: Fills down columns before moving to next column Returns: Success status and final positions of moved items
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_ids | Yes | ||
| start_column | No | ||
| start_row | No | ||
| target_container_id | Yes | ||
| total_columns | No | ||
| total_rows | No |
Implementation Reference
- main.py:1023-1052 (handler)The handler function decorated with @mcp.tool, implementing the logic to move items to a grid container by filling column by column. It auto-detects dimensions if needed, uses i.ByColumn placement, and calls the inventory API.@mcp.tool(tags={"rspace", "inventory", "movement"}) def move_items_to_grid_container_by_column( target_container_id: Union[int, str], item_ids: List[str], start_column: int = 1, start_row: int = 1, total_columns: int = None, total_rows: int = None ) -> dict: """ Moves items to grid container, filling positions column by column Usage: Alternative filling pattern for specific experimental layouts Auto-positioning: Fills down columns before moving to next column Returns: Success status and final positions of moved items """ # Auto-detect container dimensions if not provided if total_columns is None or total_rows is None: container = inv_cli.get_container_by_id(target_container_id) container_obj = i.Container.of(container) if hasattr(container_obj, 'column_count'): total_columns = container_obj.column_count() total_rows = container_obj.row_count() else: raise ValueError("Container dimensions required for non-grid containers") placement = i.ByColumn(start_column, start_row, total_columns, total_rows, *item_ids) result = inv_cli.add_items_to_grid_container(target_container_id, placement) return {"success": result.is_ok(), "results": result.data if hasattr(result, 'data') else str(result)}