Skip to main content
Glama
cfrs2005

GS Robot MCP Server

by cfrs2005

list_robot_commands

Retrieve and view historical commands sent to a GS cleaning robot by serial number, with pagination support for managing command history.

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 for 'list_robot_commands'. This decorated function is the entry point invoked by the MCP server when the tool is called. It delegates to the underlying 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 helper method implementing the list_robot_commands logic in the GausiumMCP class. Uses GausiumAPIClient to call the 'list_commands' API endpoint.
    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
                }
            )
  • Registration of the MCP tool via @mcp.tool() decorator, which registers the handler with the MCP server.
    @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)
  • API endpoint configuration for 'list_commands' used by the GausiumAPIClient, with name 'list_robot_commands'.
    'list_commands': APIEndpoint(
        name="list_robot_commands",
        path="robots/{serial_number}/commands",
        method=HTTPMethod.GET,
        version=APIVersion.V1_ALPHA1,
        description="获取机器人历史发出指令"
    )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions pagination behavior (page/page_size defaults) which is helpful, but doesn't disclose other important behavioral traits like whether this requires authentication, rate limits, what happens with invalid serial numbers, or if the list includes all commands or only certain types. The description provides some context but leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with a clear purpose statement followed by well-organized Args and Returns sections. Every sentence earns its place - the first establishes purpose, the parameter explanations are necessary given 0% schema coverage, and the return statement is appropriately brief.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 3 parameters with 0% schema coverage, the description does an adequate job but has clear gaps. It covers the basic purpose and parameters but doesn't explain the return structure beyond 'dictionary containing historical commands list', nor does it address authentication, error conditions, or how this tool relates to siblings. For a read operation with pagination, more behavioral context would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates well by explaining all three parameters: serial_number identifies the target robot, page controls pagination with default 1, and page_size controls items per page with default 10. This adds meaningful context beyond the bare schema, though it doesn't specify format requirements for serial_number or constraints on page/page_size values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Lists' and resource 'historical commands sent to a robot', making the purpose immediately understandable. However, it doesn't explicitly distinguish this tool from sibling tools like 'get_robot_command' (singular) or 'list_robots', which could cause confusion about when to use each.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives. With sibling tools like 'get_robot_command' (singular command) and 'list_robots' (robots themselves), the description doesn't clarify that this is specifically for historical commands or how it differs from other listing/retrieval tools in the server.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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