Skip to main content
Glama
rspace-os

RSpace MCP Server

Official
by rspace-os

move_items_to_grid_container_by_column

Organizes items into a grid by filling columns first, useful for experimental layouts requiring column-based arrangement.

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
NameRequiredDescriptionDefault
target_container_idYes
item_idsYes
start_columnNo
start_rowNo
total_columnsNo
total_rowsNo

Implementation Reference

  • The handler function for the 'move_items_to_grid_container_by_column' tool. It is decorated with @mcp.tool which also serves as the registration. The function moves specified items to a grid container, filling it column by column starting from the given position, auto-detecting dimensions if needed, and returns success status and results.
    @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)}

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