Skip to main content
Glama
nonead

Nonead Universal-Robots MCP Server

by nonead

get_robot_mode

Retrieve the current operating mode of a Universal Robot by IP address. Enables real-time status monitoring for robot control.

Instructions

获取指定IP机器人的运行状态 IP:机器人地址

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYes

Implementation Reference

  • The main tool handler for 'get_robot_mode'. It checks connection via link_check, calls DashboardClient.ur_robotmode(), and returns the robot's running status as a JSON string.
    @mcp.tool()
    def get_robot_mode(ip: str):
        """获取指定IP机器人的运行状态
        IP:机器人地址"""
        try:
            if '连接失败' in link_check(ip):
                return return_msg(f"与机器人的连接已断开。")
            robot_list[ip].robotConnector.DashboardClient.ur_robotmode()
            logger.info(f"IP为{ip}的优傲机器人的运行状态为: {robot_list[ip].robotConnector.DashboardClient.last_respond}")
            return return_msg(
                f"IP为{ip}的优傲机器人的运行状态为: {robot_list[ip].robotConnector.DashboardClient.last_respond}")
        except Exception as e:
            logger.error(f"运行状态获取失败: {str(e)}")
            return return_msg(f"运行状态获取失败: {str(e)}")
  • The tool is registered via the @mcp.tool() decorator on the get_robot_mode function. MCP is a FastMCP instance created on line 31.
    @mcp.tool()
  • Helper function return_msg formats the output as JSON string for the tool response.
    def return_msg(txt: str):
        return json.dumps(txt, indent=2, ensure_ascii=False)
  • Helper function link_check verifies the robot connection before executing the tool logic.
    def link_check(ip):
        """检查连接状态,若连接断开或不存在,则建立连接"""
        if robot_list.get(ip, "unknown") == "unknown" or not robot_list[
            ip].robotConnector.RTDE.isRunning():
            return connect_ur(ip)
        return '连接成功'
  • Underlying DashboardClient method ur_robotmode() that sends the 'robotmode' command to the UR robot and reads back the mode response.
    def ur_robotmode(self):
        '''
        Robot mode enquiry
        
        Return value to Log file:
        "Robotmode: <mode>", where <mode> is:        
        NO_CONTROLLER
        DISCONNECTED
        CONFIRM_SAFETY
        BOOTING
        POWER_OFF
        POWER_ON
        IDLE
        BACKDRIVE
        RUNNING
        '''
        self.__send('robotmode\n')
Behavior2/5

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

No annotations are provided, and the description fails to disclose behavioral traits such as read-only nature, authorization needs, or potential side effects. For a read-like operation, this omission is significant.

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 extremely brief, consisting of two short lines. While this is concise, it sacrifices clarity and completeness, making it borderline under-specified.

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?

With one parameter, no output schema, and no annotations, the description should compensate by explaining expected output or behavior. It does not, leaving the agent with insufficient information to use the tool effectively.

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 input schema has 0% description coverage and no enums. The description merely restates the parameter ('IP: robot address') without adding format, constraints, or examples, offering minimal added value beyond the schema.

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 gets the running status of a robot specified by IP, using a specific verb and resource. While it differentiates from siblings like get_safety_mode, the lack of title and brevity slightly reduce clarity.

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 on when to use this tool versus alternatives. The description does not provide context about typical usage scenarios or conditions, leaving the agent to infer.

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