Skip to main content
Glama

disconnect_ur

Disconnect a Universal Robot by specifying its IP address using the nUR MCP Server tool. Manage robot connections directly through natural language commands for efficient control and monitoring.

Instructions

根据用户提供的IP,断开与UR机器人的连接 IP:机器人地址

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYes

Implementation Reference

  • The handler function for the 'disconnect_ur' tool. It is decorated with @mcp.tool(), which registers it as an MCP tool. The function takes an IP string, checks if the connection exists in robot_list, closes it if so, and returns a JSON message indicating success or failure.
    @mcp.tool() def disconnect_ur(ip: str): """根据用户提供的IP,断开与UR机器人的连接 IP:机器人地址""" try: if robot_list.get(ip, "unknown") == "unknown": return return_msg("连接不存在") robot_list[ip].close() return return_msg("连接已断开。") except Exception as e: logger.error(f"连接断开失败: {str(e)}") return return_msg(f"连接断开失败: {str(e)}")
  • The @mcp.tool() decorator registers the disconnect_ur function as an MCP tool.
    @mcp.tool()
  • The function signature (ip: str) and docstring define the input schema for the tool: IP address of the robot.
    def disconnect_ur(ip: str): """根据用户提供的IP,断开与UR机器人的连接 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