stop_data_recording
Terminates active data recording sessions for Universal Robots collaborative robots by specifying a session ID, ensuring controlled data collection management.
Instructions
停止数据记录
参数:
- session_id: 记录会话ID
返回:
- 停止状态
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes |
Implementation Reference
- The handler function for the 'stop_data_recording' tool, decorated with @mcp.tool() which registers it. It checks if the advanced data recorder is initialized, calls stop_recording on the given session_id, and returns success or failure message.@mcp.tool() def stop_data_recording(session_id: str): """ 停止数据记录 参数: - session_id: 记录会话ID 返回: - 停止状态 """ try: if advanced_data_recorder is None: return return_msg("高级数据记录器未初始化") # 停止记录 success = advanced_data_recorder.stop_recording(session_id) if success: return return_msg({"success": True, "message": "数据记录已停止"}) else: return return_msg({"success": False, "message": "停止数据记录失败,会话不存在"}) except Exception as e: logger.error(f"停止数据记录失败: {str(e)}") return return_msg(f"停止数据记录失败: {str(e)}")
- src/nonead_universal_robots_mcp/server.py:1064-1064 (registration)The @mcp.tool() decorator registers the stop_data_recording function as an MCP tool.@mcp.tool()