Skip to main content
Glama
cfrs2005

GS Robot MCP Server

by cfrs2005

create_robot_command

Send commands to GS cleaning robots to start, pause, or stop tasks by specifying robot serial number and command type with optional parameters.

Instructions

Creates a robot command.

Based on: https://developer.gs-robot.com/zh_CN/Robot%20Command%20Service/Create%20Robot%20Command

Args:
    serial_number: The serial number of the target robot.
    command_type: The type of command (e.g., 'START_TASK', 'PAUSE_TASK', 'STOP_TASK').
    command_parameter: Optional command parameters as a dictionary.

Returns:
    A dictionary containing the command creation result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serial_numberYes
command_typeYes
command_parameterNo

Implementation Reference

  • Core handler implementation in GausiumMCP class that validates inputs, constructs the request payload, and calls the Gausium API endpoint 'create_command' via GausiumAPIClient to create the robot command.
    async def create_robot_command(
        self,
        serial_number: str,
        command_type: str,
        command_parameter: Optional[Dict[str, Any]] = None
    ) -> Dict[str, Any]:
        """
        创建机器人指令。
    
        Args:
            serial_number: 机器人序列号
            command_type: 指令类型 (如 'START_TASK', 'PAUSE_TASK', 等)
            command_parameter: 指令参数
    
        Returns:
            指令创建结果
    
        Raises:
            ValueError: 参数无效
            httpx.HTTPStatusError: API调用错误
            httpx.RequestError: 网络问题
        """
        if not serial_number:
            raise ValueError("Serial number cannot be empty")
        if not command_type:
            raise ValueError("Command type cannot be empty")
    
        request_data = {
            "serialNumber": serial_number,
            "remoteTaskCommandType": command_type
        }
        
        if command_parameter:
            request_data["commandParameter"] = command_parameter
    
        async with GausiumAPIClient() as client:
            return await client.call_endpoint(
                'create_command',
                path_params={'serial_number': serial_number},
                json_data=request_data
            )
  • MCP tool registration using @mcp.tool() decorator with a thin wrapper function that delegates to the core GausiumMCP.create_robot_command method.
    # Define create_robot_command tool
    @mcp.tool()
    async def create_robot_command(
        serial_number: str, 
        command_type: str,
        command_parameter: Optional[dict] = None
    ):
        """Creates a robot command.
    
        Based on: https://developer.gs-robot.com/zh_CN/Robot%20Command%20Service/Create%20Robot%20Command
    
        Args:
            serial_number: The serial number of the target robot.
            command_type: The type of command (e.g., 'START_TASK', 'PAUSE_TASK', 'STOP_TASK').
            command_parameter: Optional command parameters as a dictionary.
    
        Returns:
            A dictionary containing the command creation result.
        """
        return await mcp.create_robot_command(
            serial_number=serial_number,
            command_type=command_type,
            command_parameter=command_parameter
        )
  • API endpoint configuration defining the structure (path, method, version) for the 'create_command' endpoint, named 'create_robot_command', used by GausiumAPIClient to make the actual HTTP request.
    'create_command': APIEndpoint(
        name="create_robot_command",
        path="robots/{serial_number}/commands",
        method=HTTPMethod.POST,
        version=APIVersion.V1_ALPHA1,
        description="创建机器人指令"
    ),
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a creation operation but doesn't mention permission requirements, side effects, error conditions, or what happens when a command is created. The description lacks crucial behavioral details for a write operation.

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

Conciseness4/5

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

The description is well-structured with clear sections (Args, Returns) and uses bullet-like formatting. It's appropriately sized with no redundant information. The reference link is included but doesn't disrupt the flow. Every sentence serves a purpose.

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

Completeness2/5

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

For a creation tool with 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the command creation result contains, error handling, or important behavioral aspects. The reference to external documentation suggests the description itself is insufficient for standalone use.

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 provides valuable parameter semantics beyond the bare schema. It explains that 'serial_number' identifies the target robot, 'command_type' includes examples like 'START_TASK', and 'command_parameter' is optional dictionary parameters. This adds meaningful context to the parameter names.

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

Purpose3/5

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

The description states 'Creates a robot command' which is a clear verb+resource combination, but it's quite basic and doesn't distinguish this tool from potential sibling tools like 'execute_m_line_task_workflow' or 'submit_temp_site_task'. The purpose is understandable but lacks specificity about what kind of robot commands are created.

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?

There's no guidance on when to use this tool versus alternatives. The description doesn't mention prerequisites, appropriate contexts, or compare it to sibling tools like 'list_robot_commands' or 'get_robot_command'. The only contextual information is a reference link to external documentation.

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