Skip to main content
Glama
nonead

nUR MCP Server

by nonead

connect_ur

Connect to Universal Robots collaborative robots using the robot's IP address. This tool establishes communication with industrial robots for control through voice or text commands.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYes

Implementation Reference

  • The handler and registration for the 'connect_ur' MCP tool. This function connects to a UR robot using the provided IP address, initializes the robot model and script extension, stores them in global dictionaries, and verifies the RTDE connection. The @mcp.tool() decorator registers it as a tool, with the function signature and docstring providing the input schema.
    @mcp.tool()
    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)}")
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions connecting based on an IP address but fails to describe what happens after connection (e.g., establishes a session, enables control, may require authentication), potential errors (e.g., invalid IP, timeout), or side effects (e.g., robot becomes operational). For a tool that likely initiates robot control, this is a significant gap in transparency.

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

Conciseness4/5

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

The description is very concise with two short sentences, making it easy to parse. It's front-loaded with the main purpose. However, the brevity comes at the cost of completeness, as it omits necessary details for effective tool use, slightly reducing its efficiency score.

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

Completeness2/5

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

Given the context: no annotations, no output schema, and a simple input schema with 0% coverage, the description is incomplete. It doesn't explain what the tool returns (e.g., connection status, error messages), behavioral traits, or usage guidelines. For a tool that likely interacts with hardware (UR robot), more context is needed to ensure safe and correct invocation.

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 schema description coverage is 0%, with one parameter 'ip' documented only as a string in the schema. The description adds minimal semantics by stating 'IP:机器人地址' (IP: robot address), clarifying it's the robot's IP address. However, this is basic and doesn't compensate for the lack of schema details (e.g., format, examples, validation). Given the low coverage, the description should do more to explain parameter usage.

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

Purpose4/5

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

The description clearly states the tool's purpose: '根据用户提供的IP连接UR' (Connect UR based on user-provided IP). It specifies the verb (connect) and resource (UR/robot), making the action clear. However, it doesn't explicitly differentiate from its sibling 'disconnect_ur' beyond the obvious opposite action, which keeps it from a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid IP, robot being powered on), nor does it reference sibling tools like 'disconnect_ur' for when to switch between them. The lack of usage context leaves the agent guessing about appropriate scenarios.

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/nUR-MCP-SERVER'

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