Skip to main content
Glama
nonead

nUR MCP Server

by nonead

movel

Send TCP position commands to Universal Robots to move the tool center point linearly to specified coordinates with adjustable speed, acceleration, and blending parameters.

Instructions

发送新的TCP位置到指定IP的机器人,使TCP移动到指定位置,移动期间TCP作直线移动。 IP:机器人地址 pose:TCP位置 a:加速度(米每平方秒) v:速度(米每秒) t:移动时长(秒) r:交融半径(米)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYes
poseYes
aNo
vNo
tNo
rNo

Implementation Reference

  • The primary handler for the MCP 'movel' tool. It connects to the robot, sends the movel command via robot_list[ip].movel(), waits, and confirms completion using movelConfirm.
    @mcp.tool()
    def movel(ip: str, pose: list, a=1, v=1, t=0, r=0):
        """发送新的TCP位置到指定IP的机器人,使TCP移动到指定位置,移动期间TCP作直线移动。
        IP:机器人地址
        pose:TCP位置
        a:加速度(米每平方秒)
        v:速度(米每秒)
        t:移动时长(秒)
        r:交融半径(米)"""
        try:
            if '连接失败' in link_check(ip):
                return return_msg(f"与机器人的连接已断开。")
            cmd = f"movel(p{pose},{a},{v},{t},{r})"
            logger.info(f"发送脚本:{cmd}")
            robot_list[ip].movel(pose, a, v, t, r)
            time.sleep(1)
            result = movelConfirm(ip, pose)
    
            if result == 1:
                return return_msg(f"命令 {cmd} 已发送,移动完成。")
            else:
                return return_msg(f"命令 {cmd} 已发送,移动失败。")
        except Exception as e:
            logger.error(f"发送新的TCP位置到指定IP的机器人失败: {str(e)}")
            return return_msg(f"发送新的TCP位置到指定IP的机器人: {str(e)}")
  • Helper function called by the movel handler to verify if the robot has reached the target TCP pose after the move, checking position accuracy and program state.
    def movelConfirm(ip, pose):
        """
        movel移动的结果确认
        1:移动到位
        2:移动结束,但是位置不准确
        """
        loop_flg = True
        count = 0
        while loop_flg:
            time.sleep(1)
            current_pose = round_pose(robot_list[ip].get_actual_tcp_pose())
            if right_pose_tcp(current_pose, pose):
                robot_list[ip].robotConnector.DashboardClient.ur_running()
                running = robot_list[ip].robotConnector.DashboardClient.last_respond
                if running == 'Program running: false':
                    return 1
            else:
                robot_list[ip].robotConnector.DashboardClient.ur_running()
                running = robot_list[ip].robotConnector.DashboardClient.last_respond
    
                if running == 'Program running: true':
                    '''尚未移动完成'''
                    continue
                else:
                    '''移动完成'''
                    count = count + 1
                    if count > 5:
                        return 2
  • Helper utility used in movelConfirm to check if current TCP pose matches target within 10mm tolerance on X,Y,Z.
    def right_pose_tcp(current_pose_1, pose):
        """tcp位置是否一致的校验,这里允许10mm的误差"""
        if pose[0] + 0.010 >= current_pose_1[0] >= pose[0] - 0.010:
            if pose[1] + 0.010 >= current_pose_1[1] >= pose[1] - 0.010:
                if pose[2] + 0.010 >= current_pose_1[2] >= pose[2] - 0.010:
                    return True
    
        return False
  • Helper to round pose coordinates to 3 decimal places, used in movelConfirm for comparison.
    def round_pose(pose):
        """给坐标取近似值,精确到三位小数"""
        pose[0] = round(pose[0], 3)
        pose[1] = round(pose[1], 3)
        pose[2] = round(pose[2], 3)
        pose[3] = round(pose[3], 3)
        pose[4] = round(pose[4], 3)
        pose[5] = round(pose[5], 3)
        return pose
  • The @mcp.tool() decorator registers the movel function as an MCP tool.
    @mcp.tool()
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions straight-line motion and lists parameters, but lacks critical behavioral details: it does not specify required permissions, whether this is a blocking/non-blocking operation, error conditions (e.g., invalid IP or pose), safety implications, or what happens on success/failure. For a motion control tool with zero annotation coverage, this is a significant gap.

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 appropriately sized and front-loaded: the first sentence states the purpose, followed by a bullet-like list of parameters. Every sentence earns its place by providing essential information. It could be slightly more structured (e.g., separating purpose from parameters with a colon or line break), but it remains efficient with zero waste.

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

Completeness3/5

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

Given the tool's complexity (motion control with 6 parameters), no annotations, and no output schema, the description is partially complete. It excels in parameter semantics but lacks behavioral context (e.g., safety, errors, response format). For a tool that likely triggers physical robot movement, more details on prerequisites and outcomes are needed, though the parameter coverage is strong.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. It explicitly defines all 6 parameters with clear semantics: 'IP:机器人地址' (IP: robot address), 'pose:TCP位置' (pose: TCP position), 'a:加速度(米每平方秒)' (a: acceleration in m/s²), 'v:速度(米每秒)' (v: velocity in m/s), 't:移动时长(秒)' (t: movement time in seconds), 'r:交融半径(米)' (r: blend radius in meters). This adds substantial meaning beyond the schema's minimal titles.

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 the tool's purpose: '发送新的TCP位置到指定IP的机器人,使TCP移动到指定位置,移动期间TCP作直线移动' (Send a new TCP position to a robot at a specified IP, moving the TCP to the specified position with straight-line motion). This is specific (verb: send/move, resource: robot TCP position), distinguishes it from siblings like movej (likely joint motion) or movel_x/y/z (axis-specific moves), and avoids tautology.

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 does not mention sibling tools like movej, movel_x, movel_y, movel_z, or compare_robots_performance, nor does it specify prerequisites (e.g., requires a connected robot) or exclusions (e.g., not for joint motion). Usage is implied only by the tool's name and description 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/nUR-MCP-SERVER'

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