Skip to main content
Glama
nonead

Nonead Universal-Robots MCP Server

by nonead

connect_ur

Connects to a Universal Robots cobot using its IP address for direct control and data exchange.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYes

Implementation Reference

  • Tool registration via @mcp.tool() decorator on connect_ur function
    @mcp.tool()
    def connect_ur(ip: str):
  • Main handler for connect_ur tool - accepts an IP, creates a URBasic robot model and connection, stores it in robot_list global dict
    def connect_ur(ip: str):
        """根据用户提供的IP连接UR
        IP:机器人地址"""
        try:
            host = ip
            global robot_list, robotModle_list
    
            if robot_list.get(ip, "unknown") != "unknown":
                robot_list[ip].robotConnector.close()
                return return_msg(f"优傲机器人连接失败: {ip}")
    
            robotModle = URBasic.robotModel.RobotModel()
            robot = URBasic.urScriptExt.UrScriptExt(host=host, robotModel=robotModle)
            robot_list[ip] = robot
            robotModle_list[ip] = robotModle
    
            if robot_list.get(ip, "unknown") == "unknown" or not robot_list[
                ip].robotConnector.RTDE.isRunning():
                return return_msg(f"优傲机器人连接失败: {ip}")
    
            logger.info(f"连接成功。IP:{host}")
            return return_msg(f"连接成功。IP:{host}")
        except Exception as e:
            logger.error(f"优傲机器人连接失败: {str(e)}")
            return return_msg(f"优傲机器人连接失败: {str(e)}")
  • Input schema: connect_ur(ip: str) - takes a single string parameter 'ip' for the robot address
    def connect_ur(ip: str):
  • link_check helper calls connect_ur to re-establish connection if robot not connected
    def link_check(ip):
        """检查连接状态,若连接断开或不存在,则建立连接"""
        if robot_list.get(ip, "unknown") == "unknown" or not robot_list[
            ip].robotConnector.RTDE.isRunning():
            return connect_ur(ip)
        return '连接成功'
  • return_msg helper used by connect_ur to format JSON responses
    def return_msg(txt: str):
        return json.dumps(txt, indent=2, ensure_ascii=False)
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It fails to disclose key behaviors such as whether the connection is persistent, idempotent, requires authentication, or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, using only two short sentences with no filler words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool, the description is still incomplete. It lacks details on return values, connection lifecycle, error scenarios, or side effects, making it insufficient for an AI agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description clarifies that 'ip' is the robot address, adding some meaning beyond the schema's minimal 'Ip' title. However, it remains vague about format or validation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool connects to a UR robot using an IP address, with a specific verb and resource. It distinguishes itself from the sibling tool 'disconnect_ur'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, nor any prerequisites or exclusions. The AI agent is left to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/Nonead-Universal-Robots-MCP'

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