Skip to main content
Glama

get_robot_model

Retrieve the model of a Universal Robot by specifying its IP address. This tool provides essential robot information for effective control and monitoring.

Instructions

获取指定IP的机器人型号 IP:机器人地址

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYes

Implementation Reference

  • The primary handler function for the 'get_robot_model' MCP tool. It uses the DashboardClient to fetch the robot model and adjusts it based on remote control status.
    @mcp.tool() def get_robot_model(ip: str): """获取指定IP的机器人型号 IP:机器人地址""" try: robot_list[ip].robotConnector.DashboardClient.ur_get_robot_model() model = robot_list[ip].robotConnector.DashboardClient.last_respond robot_list[ip].robotConnector.DashboardClient.ur_is_remote_control() e = robot_list[ip].robotConnector.DashboardClient.last_respond.lower() if e == 'true' or e == 'false': model = f"{model}e" return return_msg(model) except Exception as e: logger.error(f"获取机器人型号失败: {str(e)}") return return_msg(f"获取机器人型号失败: {str(e)}")
  • Helper method in DashboardClient class that sends the 'get robot model' command to the robot's dashboard server.
    def ur_get_robot_model(self): ''' Returns the robot model ''' self.__send('get robot model\n')
  • The @mcp.tool() decorator registers this function as the MCP tool named 'get_robot_model'.
    @mcp.tool() def get_robot_model(ip: str): """获取指定IP的机器人型号 IP:机器人地址""" try: robot_list[ip].robotConnector.DashboardClient.ur_get_robot_model() model = robot_list[ip].robotConnector.DashboardClient.last_respond robot_list[ip].robotConnector.DashboardClient.ur_is_remote_control() e = robot_list[ip].robotConnector.DashboardClient.last_respond.lower() if e == 'true' or e == 'false': model = f"{model}e" return return_msg(model) except Exception as e: logger.error(f"获取机器人型号失败: {str(e)}") return return_msg(f"获取机器人型号失败: {str(e)}")

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/nonead/nUR_MCP_SERVER'

If you have feedback or need assistance with the MCP directory API, please join our Discord server