Skip to main content
Glama
cfrs2005

GS Robot MCP Server

by cfrs2005

get_robot_command

Retrieve the execution result of a specific command sent to a cleaning robot by providing its serial number and command ID.

Instructions

Gets the result of a specific robot command.

Args:
    serial_number: The serial number of the target robot.
    command_id: The ID of the command to query.

Returns:
    A dictionary containing the command execution result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serial_numberYes
command_idYes

Implementation Reference

  • Core handler method in GausiumMCP class that executes the get_robot_command logic. Validates inputs (serial_number, command_id), then calls the API client's call_endpoint with endpoint name 'get_command' and path parameters.
    async def get_robot_command(
        self, 
        serial_number: str, 
        command_id: str
    ) -> Dict[str, Any]:
        """
        获取单条指令结果。
    
        Args:
            serial_number: 机器人序列号
            command_id: 指令ID
    
        Returns:
            指令执行结果
    
        Raises:
            ValueError: 参数为空
            httpx.HTTPStatusError: API调用错误
            httpx.RequestError: 网络问题
        """
        if not serial_number:
            raise ValueError("Serial number cannot be empty")
        if not command_id:
            raise ValueError("Command ID cannot be empty")
    
        async with GausiumAPIClient() as client:
            return await client.call_endpoint(
                'get_command',
                path_params={
                    'serial_number': serial_number,
                    'command_id': command_id
                }
            )
  • MCP tool registration in main.py using @mcp.tool() decorator. This is the public-facing tool function that delegates to the GausiumMCP class method.
    async def get_robot_command(serial_number: str, command_id: str):
        """Gets the result of a specific robot command.
    
        Args:
            serial_number: The serial number of the target robot.
            command_id: The ID of the command to query.
    
        Returns:
            A dictionary containing the command execution result.
        """
        return await mcp.get_robot_command(serial_number=serial_number, command_id=command_id)
  • API endpoint definition for get_robot_command. Defines the HTTP GET endpoint at path 'robots/{serial_number}/commands/{command_id}' under API version V1_ALPHA1.
    'get_command': APIEndpoint(
        name="get_robot_command",
        path="robots/{serial_number}/commands/{command_id}",
        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 description carries full burden. It only states 'Gets the result,' implying a read operation, but no explicit disclosure of side effects, permissions, rate limits, or other behavioral traits.

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?

Description is concise, front-loaded with main purpose, includes parameter descriptions and return type. No unnecessary words or redundancy.

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 output schema, description mentions a dictionary result but lacks details on its structure. For a simple query tool, it is minimally complete but could be more helpful with result fields.

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

Parameters3/5

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

Schema coverage is 0%, so description adds meaning with brief explanations for each parameter (e.g., 'The serial number of the target robot'). Adds value beyond schema titles but not deeply descriptive.

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

Purpose5/5

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

Description clearly states 'Gets the result of a specific robot command,' identifying the action (get), resource (result), and specificity. Differentiates from siblings like list_robot_commands and create_robot_command.

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 explicit guidance on when to use this tool vs alternatives. Implicitly after creating a command, but no direct when-to-use or when-not-to-use statements.

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