Skip to main content
Glama
nonead

nUR MCP Server

by nonead

execute_collaborative_task

Execute collaborative robot tasks by providing a task ID to coordinate multiple industrial robots through voice or text commands.

Instructions

执行多机器人协同任务

参数:
- task_id: 任务ID

返回:
- 执行结果

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes

Implementation Reference

  • The core handler function for the 'execute_collaborative_task' tool, decorated with @mcp.tool() for automatic registration. It invokes the multi_robot_coordinator to execute the task identified by task_id and handles errors.
    @mcp.tool()
    def execute_collaborative_task(task_id: str):
        """
        执行多机器人协同任务
        
        参数:
        - task_id: 任务ID
        
        返回:
        - 执行结果
        """
        try:
            if multi_robot_coordinator is None:
                return return_msg("多机器人协调器未初始化")
            
            # 执行任务
            result = multi_robot_coordinator.execute_task(task_id)
            
            return return_msg(f"协同任务执行结果: {result}")
        except Exception as e:
            logger.error(f"执行协同任务失败: {str(e)}")
            return return_msg(f"执行协同任务失败: {str(e)}")
  • Initialization function called in main() that creates the AdvancedMultiRobotCoordinator instance assigned to the global multi_robot_coordinator used by the tool handler.
    def initialize_extended_modules():
        """初始化所有扩展模块"""
        global multi_robot_coordinator, advanced_trajectory_planner
        global advanced_data_recorder, advanced_data_analyzer
    
        try:
            # 初始化多机器人协调器
            multi_robot_coordinator = AdvancedMultiRobotCoordinator()
            logger.info("高级多机器人协调器初始化成功")
    
            # 初始化高级轨迹规划器
            advanced_trajectory_planner = AdvancedTrajectoryPlanner()
            logger.info("高级轨迹规划器初始化成功")
    
            # 初始化高级数据记录器
            advanced_data_recorder = AdvancedDataRecorder()
            logger.info("高级数据记录器初始化成功")
    
            # 获取数据分析器实例(单例)
            advanced_data_analyzer = get_data_analyzer()
            logger.info("高级数据分析器初始化成功")
    
            return True
        except Exception as e:
            logger.error(f"初始化扩展模块失败: {str(e)}")
            return False
  • The @mcp.tool() decorator on the handler function serves as the tool registration mechanism in the FastMCP framework.
    @mcp.tool()
  • Docstring providing the input schema (task_id: str) and output description for the tool.
    """
    执行多机器人协同任务
    
    参数:
    - task_id: 任务ID
    
    返回:
    - 执行结果
    """
  • Import of AdvancedMultiRobotCoordinator class used to instantiate the coordinator.
    from URBasic.advanced_multi_robot_coordinator import AdvancedMultiRobotCoordinator, CollaborationMode
Behavior1/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 of behavioral disclosure. It only states the action ('execute') without explaining what the execution involves—whether it triggers robot movements, requires specific permissions, has side effects, or how results are returned. This is inadequate for a tool that likely performs significant operations in a robotics context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief with three lines, but it is under-specified rather than concise. The first line states the purpose, and the next two list parameters and returns minimally. While structured, it lacks essential details, making it inefficient in conveying necessary information.

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

Completeness1/5

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

Given the complexity implied by 'collaborative task' in a robotics context, no annotations, 0% schema coverage, and no output schema, the description is severely incomplete. It does not explain what the tool does, how to use it, what the parameters mean, or what to expect as output, leaving critical gaps for agent understanding.

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

Parameters1/5

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

Schema description coverage is 0%, meaning the parameter 'task_id' is undocumented in the schema. The description only lists 'task_id: 任务ID' (task ID), which adds no meaningful semantics beyond the parameter name itself. It does not explain what a task ID is, how to obtain it, or its format, failing to compensate for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states '执行多机器人协同任务' (execute multi-robot collaborative task), which is a tautology that essentially restates the tool name 'execute_collaborative_task' in Chinese. While it specifies the action ('execute') and resource ('collaborative task'), it lacks specificity about what this execution entails or how it differs from sibling tools like 'create_collaborative_task' or 'setup_multi_robot_coordination'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/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 prerequisites (e.g., whether a task must be created first), exclusions, or how it relates to sibling tools like 'create_collaborative_task' or 'setup_multi_robot_coordination', leaving the agent with no context for tool selection.

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