Skip to main content
Glama

movel_x

Control TCP movement of a Universal Robot along the X-axis by specifying the robot's IP address and desired distance in meters using the MCP server's command interface.

Instructions

命令指定IP机器人的TCP沿X轴方向移动 IP:机器人地址 distance:移动距离(米)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
distanceYes
ipYes

Implementation Reference

  • The handler function for the 'movel_x' tool, decorated with @mcp.tool() which registers it in the MCP framework. It commands a robot at the given IP to move its TCP pose along the X-axis by the specified distance in meters, with connection checks and confirmation.
    @mcp.tool() def movel_x(ip: str, distance: float): """命令指定IP机器人的TCP沿X轴方向移动 IP:机器人地址 distance:移动距离(米)""" try: if '连接失败' in link_check(ip): return return_msg(f"与机器人的连接已断开。") pose = robot_list[ip].get_actual_tcp_pose() pose[0] = pose[0] + distance robot_list[ip].movel(pose) result = movelConfirm(ip, pose) cmd = f"movel(p[{'{:.4f}'.format(pose[0])},{'{:.4f}'.format(pose[1])},{'{:.4f}'.format(pose[2])},{'{:.4f}'.format(pose[3])},{'{:.4f}'.format(pose[4])},{'{:.4f}'.format(pose[5])},],0.5,0.25,0,0)" if result == 1: return return_msg(f"命令 {cmd} 已发送,移动完成。") else: return return_msg(f"命令 {cmd} 已发送,移动失败。") except Exception as e: logger.error(f"移动失败: {str(e)}") return return_msg(f"移动失败: {str(e)}")
  • Input schema defined by type hints (ip: str, distance: float) and docstring describing parameters and purpose.
    def movel_x(ip: str, distance: float): """命令指定IP机器人的TCP沿X轴方向移动 IP:机器人地址 distance:移动距离(米)"""
  • MCP decorator that registers the movel_x function as a tool.
    @mcp.tool()

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