Skip to main content
Glama

get_robot_model

Retrieve the model of a Universal Robot by providing its IP address to identify and manage industrial robot configurations.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYes

Implementation Reference

  • The main handler function for the MCP tool 'get_robot_model'. It sends the command to the robot's DashboardClient to get the model and appends 'e-series' indicator if remote control is enabled/disabled.
    @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" logger.info(f"{model}e") return return_msg(model) except Exception as e: logger.error(f"获取机器人型号失败: {str(e)}") return return_msg(f"获取机器人型号失败: {str(e)}")
  • Low-level helper method in DashboardClient that sends the 'get robot model' command to the UR robot's dashboard server (port 29999).
    def ur_get_robot_model(self): ''' Returns the robot model ''' self.__send('get robot model\n')
  • Helper function used by get_robot_model to format the response as JSON.
    def return_msg(txt: str): return json.dumps(txt, indent=2, ensure_ascii=False)
  • The FastMCP instance where all @mcp.tool() decorated functions are automatically registered as MCP tools.
    mcp = FastMCP( "nUR_MCP_SERVER", description="Control UR robots through the Model Context Protocol" )
  • The tool schema/arguments described in the docstring: takes 'ip: str' as input.
    """获取指定IP的机器人型号 IP:机器人地址"""

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