download_robot_map_v1
Download robot navigation maps from GS cleaning robots using the V1 API. Retrieve specific maps by providing the map ID to access robot mapping data for monitoring and control operations.
Instructions
Downloads a robot map using V1 API.
Args:
map_id: The ID of the map to download.
Returns:
A dictionary containing the map download information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| map_id | Yes |
Implementation Reference
- src/gs_openapi/main.py:198-208 (handler)MCP tool handler: registers and executes the download_robot_map_v1 tool by calling the core MCP method.@mcp.tool() async def download_robot_map_v1(map_id: str): """Downloads a robot map using V1 API. Args: map_id: The ID of the map to download. Returns: A dictionary containing the map download information. """ return await mcp.download_robot_map_v1(map_id=map_id)
- Core implementation in GausiumMCP class: calls the API client to download the robot map using V1 endpoint.async def download_robot_map_v1(self, map_id: str) -> Dict[str, Any]: """ V1获取地图下载。 Args: map_id: 地图ID Returns: 地图下载信息 Raises: ValueError: map_id为空 httpx.HTTPStatusError: API调用错误 httpx.RequestError: 网络问题 """ if not map_id: raise ValueError("Map ID cannot be empty") async with GausiumAPIClient() as client: return await client.call_endpoint( 'download_map_v1', path_params={'map_id': map_id} )
- API endpoint schema definition mapping 'download_map_v1' to the tool name and configuring the HTTP request details.'download_map_v1': APIEndpoint( name="download_robot_map_v1", path="map/{map_id}/download", method=HTTPMethod.GET, version=APIVersion.OPENAPI_V1, description="V1获取地图下载"
- src/gs_openapi/main.py:198-208 (registration)Tool registration via @mcp.tool() decorator with input schema from type hints and docstring.@mcp.tool() async def download_robot_map_v1(map_id: str): """Downloads a robot map using V1 API. Args: map_id: The ID of the map to download. Returns: A dictionary containing the map download information. """ return await mcp.download_robot_map_v1(map_id=map_id)