Skip to main content
Glama

list_robot_commands

Retrieve historical commands sent to a GS cleaning robot by serial number to monitor robot activities and track past operations.

Instructions

Lists historical commands sent to a robot.

Args: serial_number: The serial number of the target robot. page: Page number (default: 1). page_size: Number of items per page (default: 10). Returns: A dictionary containing the historical commands list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serial_numberYes
pageNo
page_sizeNo

Implementation Reference

  • MCP tool handler function for list_robot_commands, decorated with @mcp.tool() for registration and execution, delegates to GausiumMCP instance.
    @mcp.tool() async def list_robot_commands(serial_number: str, page: int = 1, page_size: int = 10): """Lists historical commands sent to a robot. Args: serial_number: The serial number of the target robot. page: Page number (default: 1). page_size: Number of items per page (default: 10). Returns: A dictionary containing the historical commands list. """ return await mcp.list_robot_commands(serial_number=serial_number, page=page, page_size=page_size)
  • Core handler implementation in GausiumMCP class that performs the API call to list robot commands using GausiumAPIClient.
    async def list_robot_commands( self, serial_number: str, page: int = 1, page_size: int = 10 ) -> Dict[str, Any]: """ 获取机器人历史发出指令。 Args: serial_number: 机器人序列号 page: 页码,默认1 page_size: 每页数量,默认10 Returns: 历史指令列表 Raises: ValueError: 序列号为空 httpx.HTTPStatusError: API调用错误 httpx.RequestError: 网络问题 """ if not serial_number: raise ValueError("Serial number cannot be empty") async with GausiumAPIClient() as client: return await client.call_endpoint( 'list_commands', path_params={'serial_number': serial_number}, query_params={ 'page': page, 'pageSize': page_size } )
  • API endpoint configuration defining the path, method, and name for the list_commands endpoint used by the client.
    'list_commands': APIEndpoint( name="list_robot_commands", path="robots/{serial_number}/commands", method=HTTPMethod.GET, version=APIVersion.V1_ALPHA1, description="获取机器人历史发出指令" )

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/cfrs2005/mcp-gs-robot'

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