Skip to main content
Glama
cfrs2005

GS Robot MCP Server

by cfrs2005

get_map_subareas

Retrieve detailed subarea information from robot maps to enable precise zone control and targeted cleaning operations.

Instructions

Gets map subareas information for precise area control.

Args:
    map_id: The ID of the target map.

Returns:
    A dictionary containing map subareas information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
map_idYes

Implementation Reference

  • Core handler method in GausiumMCP class that implements the tool logic by calling the Gausium API client with appropriate endpoint.
    async def get_map_subareas(self, map_id: str, robot_sn: str = None) -> Dict[str, Any]:
        """
        获取地图分区信息。
    
        Args:
            map_id: 地图ID
            robot_sn: 机器人序列号 (某些API版本需要)
    
        Returns:
            地图分区详细信息
    
        Raises:
            ValueError: map_id为空
            httpx.HTTPStatusError: API调用错误
            httpx.RequestError: 网络问题
        """
        if not map_id:
            raise ValueError("Map ID cannot be empty")
    
        # 构建请求体
        request_data = {"mapId": map_id}
        if robot_sn:
            request_data["robotSn"] = robot_sn
    
        async with GausiumAPIClient() as client:
            return await client.call_endpoint(
                'get_map_subareas',
                json_data=request_data
            )
  • MCP tool registration using @mcp.tool() decorator. Thin wrapper that delegates to the GausiumMCP instance method.
    @mcp.tool()
    async def get_map_subareas(map_id: str):
        """Gets map subareas information for precise area control.
    
        Args:
            map_id: The ID of the target map.
    
        Returns:
            A dictionary containing map subareas information.
        """
        return await mcp.get_map_subareas(map_id=map_id)
  • API endpoint configuration defining the path, method, version, and other details used by the GausiumAPIClient to make the actual HTTP call.
    'get_map_subareas': APIEndpoint(
        name="get_map_subareas",
        path="map/subareas/get",
        method=HTTPMethod.POST,
        version=APIVersion.OPENAPI_V1,
        description="查询机器人地图分区"
    ),
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a read operation ('Gets'), but doesn't mention authentication requirements, rate limits, error conditions, or what 'precise area control' entails. The return format is vaguely described as 'a dictionary containing map subareas information' without specifying structure or content.

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 efficiently structured with a purpose statement followed by clearly labeled Args and Returns sections. Every sentence serves a purpose with zero wasted words, making it easy to parse and understand.

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

Completeness3/5

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

For a single-parameter read tool with no annotations or output schema, the description provides adequate basic information about what the tool does and its parameter. However, it lacks details about the return value structure, error handling, and how it relates to other map-related tools in the server, leaving some contextual gaps.

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

Parameters4/5

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

With only 1 parameter and 0% schema description coverage, the description compensates well by documenting the single parameter 'map_id' and explaining it's 'The ID of the target map'. This provides essential semantic context beyond the bare schema, though it could specify format constraints or examples.

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's purpose with the verb 'Gets' and resource 'map subareas information', and adds context about 'precise area control'. However, it doesn't explicitly differentiate from sibling tools like 'list_robot_maps' or 'download_robot_map_v1/v2', which prevents a perfect score.

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

Usage Guidelines2/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. There's no mention of prerequisites, when-not-to-use scenarios, or comparison with sibling tools that might also retrieve map-related information.

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