Skip to main content
Glama
cfrs2005

GS Robot MCP Server

by cfrs2005

get_site_info

Retrieve site information for a GS cleaning robot, including building layouts, floor plans, and map data to support navigation and task 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
NameRequiredDescriptionDefault
robot_idYes

Implementation Reference

  • MCP tool registration for 'get_site_info' using @mcp.tool() decorator, with docstring defining input/output schema.
    @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 invokes the Gausium API client to fetch 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 configuration definition used by GausiumAPIClient for the get_site_info call.
    'get_site_info': APIEndpoint(
        name="get_site_info",
        path="robots/{robot_id}/getSiteInfo", 
        method=HTTPMethod.GET,
        version=APIVersion.OPENAPI_V2_ALPHA1,
        description="获取站点信息"
    ),

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