upload_robot_map_v1
Upload map data to a GS cleaning robot for navigation. Provide map details and receive a record ID for tracking.
Instructions
Uploads a robot map using V1 API.
Args:
map_data: Map data to upload.
Returns:
A dictionary containing the upload result with record_id.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| map_data | Yes |
Implementation Reference
- Core implementation of upload_robot_map_v1 - validates input and calls the API endpoint via GausiumAPIClient.call_endpoint with 'upload_map_v1' endpoint name
async def upload_robot_map_v1( self, map_data: Dict[str, Any] ) -> Dict[str, Any]: """ V1地图上传。 Args: map_data: 地图数据 Returns: 上传结果,包含record_id Raises: ValueError: 地图数据为空 httpx.HTTPStatusError: API调用错误 httpx.RequestError: 网络问题 """ if not map_data: raise ValueError("Map data cannot be empty") async with GausiumAPIClient() as client: return await client.call_endpoint( 'upload_map_v1', json_data=map_data ) - src/gs_openapi/main.py:174-184 (handler)MCP tool decorator registration of upload_robot_map_v1 - the entry point exposed via @mcp.tool(), delegates to mcp.upload_robot_map_v1
@mcp.tool() async def upload_robot_map_v1(map_data: dict): """Uploads a robot map using V1 API. Args: map_data: Map data to upload. Returns: A dictionary containing the upload result with record_id. """ return await mcp.upload_robot_map_v1(map_data=map_data) - src/gs_openapi/core/endpoints.py:183-189 (registration)API endpoint definition for 'upload_map_v1' - maps to the 'map/upload' path with POST method under OPENAPI_V1
'upload_map_v1': APIEndpoint( name="upload_robot_map_v1", path="map/upload", method=HTTPMethod.POST, version=APIVersion.OPENAPI_V1, description="V1地图上传" ),