get_ur_software_version
Retrieve software version information from Universal Robots by providing the robot's IP address. Use this tool to check and monitor robot software status through the nUR MCP Server.
Instructions
根据用户提供的IP,获取指定机器人的软件版本 IP:机器人地址
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | Yes |
Implementation Reference
- The main handler function for the 'get_ur_software_version' tool, decorated with @mcp.tool() for automatic registration in the MCP server. It connects to the UR robot via IP, calls ur_polyscopeVersion() to fetch the software version, logs it, and returns the result or error message.@mcp.tool() def get_ur_software_version(ip: str): """根据用户提供的IP,获取指定机器人的软件版本 IP:机器人地址""" try: if '连接失败' in link_check(ip): return return_msg(f"与机器人的连接已断开。") robot_list[ip].robotConnector.DashboardClient.ur_polyscopeVersion() result = robot_list[ip].robotConnector.DashboardClient.last_respond logger.info(f"IP为{ip}的优傲机器人的软件版本是{result}") return return_msg(f"IP为{ip}的优傲机器人的软件版本是{result}") except Exception as e: logger.error(f"软件版本获取失败: {str(e)}") return return_msg(f"软件版本获取失败: {str(e)}")
- src/nonead_universal_robots_mcp/server.py:260-260 (registration)The @mcp.tool() decorator registers the get_ur_software_version function as an MCP tool.@mcp.tool()
- Docstring providing tool description and input parameter (ip: str) schema."""根据用户提供的IP,获取指定机器人的软件版本 IP:机器人地址"""