Skip to main content
Glama
cfrs2005

GS Robot MCP Server

by cfrs2005

submit_temp_no_site_task

Submits a temporary cleaning task for S-line robots without requiring site data. Provide task data with map and area details to initiate robot task execution.

Instructions

Submits a temporary task without site information for S-line robots.

Args:
    task_data: Task data including map and area information.

Returns:
    A dictionary containing the task submission result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_dataYes

Implementation Reference

  • MCP tool registration for submit_temp_no_site_task via @mcp.tool() decorator, delegates to mcp.submit_temp_no_site_task()
    # Define submit_temp_no_site_task tool
    @mcp.tool()
    async def submit_temp_no_site_task(task_data: dict):
        """Submits a temporary task without site information for S-line robots.
    
        Args:
            task_data: Task data including map and area information.
    
        Returns:
            A dictionary containing the task submission result.
        """
        return await mcp.submit_temp_no_site_task(task_data=task_data)
  • Handler method in GausiumMCP class that calls the API endpoint 'submit_temp_no_site_task' via GausiumAPIClient
    async def submit_temp_no_site_task(
        self,
        task_data: Dict[str, Any]
    ) -> Dict[str, Any]:
        """
        S线无站点临时任务下发。
    
        Args:
            task_data: 任务数据,包含地图、区域等信息
    
        Returns:
            任务下发结果
    
        Raises:
            ValueError: 任务数据无效
            httpx.HTTPStatusError: API调用错误
            httpx.RequestError: 网络问题
        """
        if not task_data:
            raise ValueError("Task data cannot be empty")
    
        async with GausiumAPIClient() as client:
            return await client.call_endpoint(
                'submit_temp_no_site_task',
                json_data=task_data
            )
  • API endpoint schema definition for submit_temp_no_site_task under ROBOT_TASK_ENDPOINTS - POST to v1alpha1/tasks/temporary/no-site
    'submit_temp_no_site_task': APIEndpoint(
        name="submit_temp_no_site_task", 
        path="tasks/temporary/no-site",
        method=HTTPMethod.POST,
        version=APIVersion.V1_ALPHA1,
        description="S线无站点临时任务下发"
    )
  • Workflow engine method that uses submit_temp_no_site_task as part of the S-line no-site task workflow
    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
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are absent. Description only says 'submits' without disclosing mutability, destructive potential, authentication requirements, or side effects. Barely provides any behavioral context beyond a generic submission action.

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?

Description is brief with two sentences plus Args/Returns sections. No wasted words, but the Args section merely paraphrases the parameter name. The Returns section is generic.

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?

No output schema or annotations. For a task submission tool, critical context about return values, error handling, and preconditions is missing. The loose input schema is not compensated by the description.

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

Parameters3/5

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

Schema coverage is 0%, but the description adds that task_data should include 'map and area information', which provides some guidance beyond the loose schema. However, it lacks detail on expected structure or constraints.

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

Purpose5/5

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

Clearly states it submits a temporary task without site information for S-line robots. The verb 'submits' and resource 'temporary task without site information' are specific, and the name contrasts with sibling 'submit_temp_site_task'.

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?

Implies usage when site information is absent, but does not explicitly state when to use this tool versus alternatives like 'submit_temp_site_task'. No when-not-to-use guidance provided.

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