Skip to main content
Glama

create_collaborative_task

Create multi-robot collaborative tasks by assigning operations to specific robots and defining task dependencies for coordinated execution.

Instructions

创建多机器人协同任务 参数: - task_name: 任务名称 - robot_assignments: 机器人任务分配,格式为{"robot_id": {"operation": "...", "params": {...}}} - dependencies: 任务依赖关系列表,格式为[{"from": "task1", "to": "task2"}] 返回: - 任务创建结果

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_nameYes
robot_assignmentsYes
dependenciesNo

Implementation Reference

  • Handler function for the create_collaborative_task tool. Decorated with @mcp.tool() for MCP registration. Delegates task creation to AdvancedMultiRobotCoordinator instance, with input validation via type hints and docstring schema.
    @mcp.tool() def create_collaborative_task(task_name: str, robot_assignments: dict, dependencies: list = None): """ 创建多机器人协同任务 参数: - task_name: 任务名称 - robot_assignments: 机器人任务分配,格式为{"robot_id": {"operation": "...", "params": {...}}} - dependencies: 任务依赖关系列表,格式为[{"from": "task1", "to": "task2"}] 返回: - 任务创建结果 """ try: if multi_robot_coordinator is None: return return_msg("多机器人协调器未初始化") # 创建任务 task_id = multi_robot_coordinator.create_collaboration_task( task_name=task_name, robot_assignments=robot_assignments, dependencies=dependencies ) return return_msg(f"协同任务创建成功,任务ID: {task_id}") except Exception as e: logger.error(f"创建协同任务失败: {str(e)}") return return_msg(f"创建协同任务失败: {str(e)}")

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