Skip to main content
Glama
cfrs2005

GS Robot MCP Server

by cfrs2005

execute_s_line_no_site_task_workflow

Automates S-line robot task workflows by mapping, selecting subareas, building tasks, and submitting them using robot serial numbers and parameters.

Instructions

Executes complete S-line robot task workflow without site information.

Automated process: Map list → Map selection → Subarea retrieval → Task building → Task submission

Args:
    robot_sn: The serial number of the target robot.
    task_parameters: Task parameters including map criteria and task settings.

Returns:
    A dictionary containing the workflow execution result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
robot_snYes
task_parametersYes

Implementation Reference

  • MCP tool registration using @mcp.tool() decorator. This is the entry point for the tool invocation, delegating to GausiumMCP instance.
    @mcp.tool()
    async def execute_s_line_no_site_task_workflow(
        robot_sn: str,
        task_parameters: dict
    ):
        """Executes complete S-line robot task workflow without site information.
        
        Automated process: Map list → Map selection → Subarea retrieval → Task building → Task submission
    
        Args:
            robot_sn: The serial number of the target robot.
            task_parameters: Task parameters including map criteria and task settings.
    
        Returns:
            A dictionary containing the workflow execution result.
        """
        return await mcp.execute_s_line_no_site_task_workflow(
            robot_sn=robot_sn,
            task_parameters=task_parameters
        )
  • GausiumMCP class method that wraps and delegates the workflow execution to TaskExecutionEngine.
    async def execute_s_line_no_site_task_workflow(
        self,
        robot_sn: str,
        task_parameters: Dict[str, Any]
    ) -> Dict[str, Any]:
        """
        执行S线无站点任务完整工作流。
        
        自动化流程:地图列表 → 地图选择 → 分区获取 → 任务构建 → 任务下发
        
        Args:
            robot_sn: 机器人序列号
            task_parameters: 任务参数
            
        Returns:
            工作流执行结果
        """
        return await self.task_engine.execute_s_line_no_site_task(
            robot_sn=robot_sn,
            task_parameters=task_parameters
        )
  • Core handler implementing the S-line no-site task workflow: fetches robot maps, selects map, retrieves subareas, builds task data, and submits temporary no-site task via API.
    async def execute_s_line_no_site_task(
        self,
        robot_sn: str,
        task_parameters: Dict[str, Any]
    ) -> Dict[str, Any]:
        """
        执行S线无站点任务。
        
        工作流:
        1. 获取机器人地图列表
        2. 获取目标地图分区
        3. 构建并下发无站点临时任务
        
        Args:
            robot_sn: 机器人序列号
            task_parameters: 任务参数
            
        Returns:
            任务执行结果
        """
        logger.info(f"Starting S-line no-site task execution for robot: {robot_sn}")
        
        async with GausiumAPIClient() as client:
            try:
                # 1. 获取机器人地图列表
                maps_response = await client.call_endpoint(
                    'list_maps',
                    json_data={'robotSn': robot_sn}
                )
                
                # 处理Gausium特殊响应格式
                if maps_response.get('code') != 0:
                    raise RuntimeError(f"Failed to get maps: {maps_response.get('msg')}")
                
                available_maps = maps_response.get('data', [])
                if not available_maps:
                    raise ValueError("No maps found for robot")
                
                # 2. 选择目标地图
                target_map_id = self._select_map_from_list(
                    available_maps,
                    task_parameters.get('map_criteria', {})
                )
                
                # 3. 获取地图分区
                subareas = await client.call_endpoint(
                    'get_map_subareas',
                    path_params={'map_id': target_map_id}
                )
                
                # 4. 构建任务数据
                task_data = self._build_no_site_task_data(
                    target_map_id,
                    subareas,
                    task_parameters
                )
                
                # 5. 下发无站点临时任务
                task_result = await client.call_endpoint(
                    'submit_temp_no_site_task',
                    json_data=task_data
                )
                
                logger.info(f"S-line no-site task executed successfully: {task_result}")
                return task_result
                
            except Exception as e:
                logger.error(f"S-line no-site task execution failed: {str(e)}")
                raise
  • Helper function to construct the task data dictionary for submitting no-site temporary tasks.
    def _build_no_site_task_data(
        self,
        map_id: str,
        subareas: Dict[str, Any],
        task_parameters: Dict[str, Any]
    ) -> Dict[str, Any]:
        """
        构建无站点任务数据。
        
        Args:
            map_id: 地图ID
            subareas: 地图分区信息
            task_parameters: 任务参数
            
        Returns:
            任务数据
        """
        # TODO: 根据实际API要求构建任务数据
        task_data = {
            "mapId": map_id,
            "subareas": subareas,
            "taskType": task_parameters.get('task_type', 'cleaning'),
            "cleaningMode": task_parameters.get('cleaning_mode', '__middle_cleaning'),
            **task_parameters
        }
        
        return task_data
  • Helper function to select the target map from the robot's available maps based on criteria.
    def _select_map_from_list(
        self,
        available_maps: List[Dict[str, Any]],
        criteria: Dict[str, Any]
    ) -> str:
        """
        从地图列表中选择目标地图。
        
        Args:
            available_maps: 可用地图列表  
            criteria: 选择条件
            
        Returns:
            选中的地图ID
        """
        if not criteria:
            return available_maps[0]['mapId']
        
        # TODO: 实现地图选择逻辑
        for map_info in available_maps:
            if self._matches_criteria(map_info, criteria):
                return map_info['mapId']
        
        return available_maps[0]['mapId']
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 of behavioral disclosure. It describes the workflow steps and mentions it's 'automated', but lacks critical details such as whether this is a read-only or destructive operation, authentication requirements, rate limits, error handling, or what 'complete' execution entails. The description doesn't contradict annotations (since none exist), but it's insufficient for a mutation tool with complex behavior.

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, starting with the core purpose and then detailing the automated process and parameters. Each sentence adds value: the first states what it does, the second outlines steps, and the last two explain args and returns. There's no unnecessary fluff, but it could be slightly more structured (e.g., bullet points for steps).

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

Completeness2/5

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

Given the complexity (a multi-step workflow tool with 2 parameters, nested objects, and no output schema), the description is incomplete. It lacks details on behavioral traits (e.g., side effects, permissions), parameter specifics (especially for 'task_parameters'), and output format (only vaguely 'a dictionary containing the workflow execution result'). With no annotations and low schema coverage, this leaves significant gaps for an AI agent to understand and invoke the tool correctly.

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

Parameters2/5

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

The schema description coverage is 0%, so the description must compensate. It lists two parameters ('robot_sn' and 'task_parameters') and provides minimal semantics: 'robot_sn' is described as 'The serial number of the target robot', and 'task_parameters' as 'Task parameters including map criteria and task settings'. However, this is vague—'map criteria' and 'task settings' are not elaborated, and the nested object structure of 'task_parameters' (with additionalProperties: true) is undocumented. The description adds some value but doesn't fully compensate for the low schema coverage.

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

Purpose4/5

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

The description clearly states the tool 'executes complete S-line robot task workflow without site information' and outlines the automated process steps (Map list → Map selection → Subarea retrieval → Task building → Task submission). This specifies the verb ('executes') and resource ('S-line robot task workflow'), distinguishing it from siblings like 'execute_s_line_site_task_workflow' which includes site information. However, it doesn't explicitly differentiate from other workflow tools like 'execute_m_line_task_workflow' beyond the 'S-line' qualifier.

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

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning 'without site information' and listing the automated steps, which suggests this is for robots not associated with a specific site. It distinguishes from 'execute_s_line_site_task_workflow' by the site aspect, but doesn't provide explicit guidance on when to use this versus alternatives like 'submit_temp_no_site_task' or 'execute_m_line_task_workflow'. No exclusions or prerequisites are stated, leaving some ambiguity.

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/cfrs2005/mcp-gs-robot'

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