get_site_info
Retrieve site information for GS cleaning robots including building layouts, floor plans, and map data to support navigation and operational planning.
Instructions
Gets site information for a specific robot.
Based on: https://developer.gs-robot.com/zh_CN/Robot%20Task%20Service/Get%20Site%20Info
Args:
robot_id: The ID of the target robot.
Returns:
A dictionary containing site information including buildings, floors, and maps.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| robot_id | Yes |
Implementation Reference
- src/gs_openapi/main.py:91-103 (handler)MCP tool registration and handler for 'get_site_info'. Delegates to GausiumMCP method.@mcp.tool() async def get_site_info(robot_id: str): """Gets site information for a specific robot. Based on: https://developer.gs-robot.com/zh_CN/Robot%20Task%20Service/Get%20Site%20Info Args: robot_id: The ID of the target robot. Returns: A dictionary containing site information including buildings, floors, and maps. """ return await mcp.get_site_info(robot_id=robot_id)
- Core handler implementation in GausiumMCP class that calls the Gausium OpenAPI endpoint for site information.async def get_site_info(self, robot_id: str) -> Dict[str, Any]: """ 获取站点信息。 Args: robot_id: 机器人ID Returns: 站点信息,包括建筑、楼层和地图 Raises: ValueError: robot_id为空 httpx.HTTPStatusError: API调用错误 httpx.RequestError: 网络问题 """ if not robot_id: raise ValueError("Robot ID cannot be empty") async with GausiumAPIClient() as client: return await client.call_endpoint( 'get_site_info', path_params={'robot_id': robot_id} )
- API endpoint schema/definition for the get_site_info endpoint used by the client.'get_site_info': APIEndpoint( name="get_site_info", path="robots/{robot_id}/getSiteInfo", method=HTTPMethod.GET, version=APIVersion.OPENAPI_V2_ALPHA1, description="获取站点信息" ),
- Usage of get_site_info endpoint in S-line site task workflow.site_info = await client.call_endpoint( 'get_site_info', path_params={'robot_id': robot_id} )