Skip to main content
Glama
rspace-os

RSpace MCP Server

Official
by rspace-os

move_items_to_grid_container_by_row

Systematically moves items to grid containers by filling positions row by row, automatically calculating next available positions for plates, boxes, or other gridded containers.

Instructions

Moves items to grid container, filling positions row by row

Usage: Systematic filling of plates, boxes, or other gridded containers Auto-positioning: Automatically calculates next available positions Dimensions: Auto-detected from container if not provided

Returns: Success status and final positions of moved items

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idsYes
start_columnNo
start_rowNo
target_container_idYes
total_columnsNo
total_rowsNo

Implementation Reference

  • The handler function implementing the 'move_items_to_grid_container_by_row' tool. It is registered via the @mcp.tool decorator. The function moves inventory items (samples or containers) into a grid container, filling positions sequentially by row. It auto-detects grid dimensions if not provided, creates a ByRow placement strategy using the RSpace inventory client library, and executes the move operation.
    @mcp.tool(tags={"rspace", "inventory", "movement"}) def move_items_to_grid_container_by_row( 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 row by row Usage: Systematic filling of plates, boxes, or other gridded containers Auto-positioning: Automatically calculates next available positions Dimensions: Auto-detected from container if not provided 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.ByRow(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)}

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/rspace-os/rspace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server