Skip to main content
Glama
cfrs2005

GS Robot MCP Server

by cfrs2005

get_robot_status_smart

Auto-detect robot series (M-line V1 or S-line V2) and retrieve its status by serial number.

Instructions

智能获取机器人状态。

自动根据机器人系列选择V1 (M-line) 或V2 (S-line) API。

Args:
    serial_number: 机器人序列号
    
Returns:
    机器人状态信息字典

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serial_numberYes

Implementation Reference

  • MCP tool registration for get_robot_status_smart. Decorated with @mcp.tool(), it delegates to router.get_robot_status_smart.
    @mcp.tool()
    async def get_robot_status_smart(serial_number: str):
        """智能获取机器人状态。
        
        自动根据机器人系列选择V1 (M-line) 或V2 (S-line) API。
        
        Args:
            serial_number: 机器人序列号
            
        Returns:
            机器人状态信息字典
        """
        return await router.get_robot_status_smart(serial_number)
  • Core handler logic in RobotAPIRouter. Determines robot series from serial number prefix, then routes to V1 (M-line) or V2 (S-line) API.
    async def get_robot_status_smart(self, serial_number: str) -> Dict[str, Any]:
        """智能获取机器人状态。
        
        自动根据机器人序列号前缀选择V1或V2 API。
        """
        # 基于序列号前缀判断机器人系列
        detected_series = self._determine_robot_series_from_sn(serial_number)
        
        if self.is_s_line_robot(detected_series):
            # S-line 机器人使用 V2 API
            result = await self.mcp.get_robot_status_v2(serial_number)
            result["api_version"] = "V2 (S-line)"
            result["detected_series"] = detected_series
            return result
        else:
            # M-line 机器人或未知类型默认使用 V1 API
            result = await self.mcp.get_robot_status_v1(serial_number)
            result["api_version"] = "V1 (M-line/Default)"
            result["detected_series"] = detected_series
            return result
  • Series mapping schema used by _determine_robot_series_from_sn to classify robots based on serial number prefix.
    ROBOT_SERIES_MAPPING = {
        # M-line 机器人
        "GS100": "75",    # 75系列
        "GS400": "75",    # 75系列 (新发现)
        "GS500": "75",    # 75系列
        "GS301": "50",    # 50系列
        "GS401": "50",    # 50系列  
        "GS501": "50",    # 50系列 (新发现)
        "GS442": "40",    # 40系列
        
        # S-line 机器人
        "GS438": "S",     # S系列
        "GS408": "S",     # S系列
        "GS43C": "SW",    # SW系列
    }
  • Helper that extracts the 5-char prefix from serial number and looks up the robot series in the mapping.
    def _determine_robot_series_from_sn(self, serial_number: str) -> str:
        """根据序列号前缀判断机器人系列。
        
        Args:
            serial_number: 机器人序列号
            
        Returns:
            机器人系列代码 (40, 50, 75, S, SW) 或 "unknown"
        """
        if len(serial_number) < 5:
            return "unknown"
        
        prefix = serial_number[:5]
        return self.ROBOT_SERIES_MAPPING.get(prefix, "unknown")
    
    def is_m_line_robot(self, model_family_code: str) -> bool:
        """判断是否为M-line机器人。"""
        return model_family_code in ["40", "50", "75", "OMNIE"]
  • Helper that returns True if the model family code indicates an S-line robot.
    def is_s_line_robot(self, model_family_code: str) -> bool:
        """判断是否为S-line机器人。"""
        return model_family_code in ["S", "SW"]
Behavior3/5

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

Without annotations, the description carries full burden for behavioral transparency. It discloses the key behavior of automatic version selection based on robot series and mentions the return type ('机器人状态信息字典'). However, it lacks details on error handling, authentication, idempotency, or other important behavioral traits, leaving 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 very concise: a title line, a behavior line, and structured Args/Returns sections. Every sentence serves a purpose, and the most important information (automatic version selection) is front-loaded. No unnecessary words or clutter.

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 the tool has 21 siblings and no output schema, the description is somewhat incomplete. It explains the auto-versioning feature but does not elaborate on how to interpret the return value ('状态信息字典'), error conditions, or how this tool relates to siblings like 'batch_get_robot_statuses_smart'. More context would help an agent select and use it correctly.

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?

The schema has 0% description coverage for the single parameter 'serial_number'. The description's Args section adds the meaning '机器人序列号' (robot serial number), which is the missing description. While it does not specify format or constraints, it significantly adds value beyond the bare schema, compensating for the lack of schema description.

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?

The description clearly states the tool's purpose: '智能获取机器人状态' (smartly get robot status) and explains it automatically selects the appropriate API version (V1 or V2) based on the robot series. This distinguishes it from sibling tools that may require explicit version specification, making the purpose specific and differentiating.

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

Usage Guidelines3/5

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

The description implies usage when automatic version selection is desired, but it does not explicitly state when not to use it or compare it to siblings like 'batch_get_robot_statuses_smart'. There is no guidance on alternatives or exclusions, so the usage context is only implied.

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