Skip to main content
Glama
cfrs2005

GS Robot MCP Server

by cfrs2005

list_robot_maps

Retrieve available maps for a GS cleaning robot using its serial number to identify navigation areas and plan cleaning tasks.

Instructions

Fetches the list of maps associated with a specific robot.

Based on: https://developer.gs-robot.com/zh_CN/Robot%20Map%20Service/V1%20List%20Robot%20Map
Note: This API uses POST method with robotSn in the JSON body.

Args:
    robot_sn: The serial number of the target robot (e.g., 'GS008-0180-C7P-0000').

Returns:
    A list of dictionaries, each containing 'mapId' and 'mapName'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
robot_snYes

Implementation Reference

  • MCP tool registration for 'list_robot_maps' using @mcp.tool() decorator. This defines the tool interface, documentation, and delegates execution to the GausiumMCP instance method.
    @mcp.tool()
    async def list_robot_maps(robot_sn: str):
        """Fetches the list of maps associated with a specific robot.
    
        Based on: https://developer.gs-robot.com/zh_CN/Robot%20Map%20Service/V1%20List%20Robot%20Map
        Note: This API uses POST method with robotSn in the JSON body.
    
        Args:
            robot_sn: The serial number of the target robot (e.g., 'GS008-0180-C7P-0000').
    
        Returns:
            A list of dictionaries, each containing 'mapId' and 'mapName'.
        """
        return await mcp.list_robot_maps(robot_sn=robot_sn)
  • Primary handler implementation in GausiumMCP class that executes the tool logic by calling the underlying 'list_maps' API endpoint via GausiumAPIClient.
    async def list_robot_maps(self, robot_sn: str) -> List[Dict[str, Any]]:
        """
        获取与特定机器人关联的地图列表。
    
        Args:
            robot_sn: 目标机器人的序列号
    
        Returns:
            包含地图ID和地图名称的字典列表
    
        Raises:
            ValueError: 如果robot_sn为空
            httpx.HTTPStatusError: API调用返回错误状态码
            httpx.RequestError: 网络连接问题
            KeyError: 响应格式异常
        """
        if not robot_sn:
            raise ValueError("Robot serial number cannot be empty")
    
        async with GausiumAPIClient() as client:
            response = await client.call_endpoint(
                'list_maps',
                json_data={'robotSn': robot_sn}
            )
            
            # 处理Gausium特殊的响应格式
            if response.get('code') == 0:
                return response.get('data', [])
            else:
                raise RuntimeError(f"API returned error: {response.get('msg', 'Unknown error')}")
  • Schema/Configuration for the underlying API endpoint 'list_maps' (mapped to tool name 'list_robot_maps') used in the handler implementation.
    'list_maps': APIEndpoint(
        name="list_robot_maps",
        path="map/robotMap/list",
        method=HTTPMethod.POST,
        version=APIVersion.OPENAPI_V1,
        description="V1列出机器人地图"
    ),
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the operation (fetching a list via POST method), specifies the required parameter with an example, and outlines the return format. However, it lacks details on error handling, rate limits, or authentication needs, which would be beneficial for a tool with no annotation support.

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

Conciseness5/5

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

The description is well-structured and front-loaded with the core purpose, followed by a note on the API method and detailed parameter/return sections. Every sentence adds value—no redundancy or fluff—making it efficient and easy to parse.

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

Completeness4/5

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

Given the tool's low complexity (1 parameter, no nested objects) and lack of annotations/output schema, the description is nearly complete: it covers purpose, usage note, parameter details, and return format. A minor gap is the absence of error or edge-case information, but overall it provides sufficient context for effective use.

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

Parameters5/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 fully compensate. It does so by clearly explaining the single parameter 'robot_sn' as 'The serial number of the target robot' and providing an example value ('GS008-0180-C7P-0000'), adding essential meaning beyond the basic schema.

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?

The description clearly states the specific action ('fetches the list of maps') and resource ('associated with a specific robot'), distinguishing it from siblings like 'list_robots' (which lists robots) or 'download_robot_map_v1/v2' (which downloads maps). It precisely defines the tool's function without being vague or tautological.

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 specifying the target resource ('robot') and parameter ('robot_sn'), but does not explicitly state when to use this tool versus alternatives like 'get_map_subareas' or other map-related tools. No exclusions or prerequisites are mentioned, leaving usage context somewhat inferred.

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