Skip to main content
Glama

get_robot_status_smart

Retrieve robot status information by automatically selecting the correct API version based on the robot's serial number, providing current operational data for monitoring and management.

Instructions

智能获取机器人状态。

自动根据机器人系列选择V1 (M-line) 或V2 (S-line) API。 Args: serial_number: 机器人序列号 Returns: 机器人状态信息字典

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serial_numberYes

Implementation Reference

  • Core handler function implementing the smart robot status retrieval. Detects robot series from serial number prefix using _determine_robot_series_from_sn and routes to self.mcp.get_robot_status_v1() or v2() accordingly, enhancing the result with api_version and detected_series.
    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
  • MCP tool registration via @mcp.tool() decorator. This is the entrypoint function for the 'get_robot_status_smart' tool, which delegates execution to the RobotAPIRouter instance's get_robot_status_smart method.
    @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)

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