Skip to main content
Glama
madorn
by madorn

get_bridge_info

Retrieve Bond Bridge device information including version, uptime, and configuration details for smart home device management.

Instructions

Get Bond Bridge information and status.

Returns: Bridge information including version, uptime, and configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'get_bridge_info', decorated with @mcp.tool(). It fetches bridge information from the Bond client and augments it with server configuration details.
    @mcp.tool()
    async def get_bridge_info() -> Dict[str, Any]:
        """Get Bond Bridge information and status.
        
        Returns:
            Bridge information including version, uptime, and configuration.
        """
        try:
            async with await get_bond_client() as client:
                bridge_info = await client.get_bridge_info()
                return {
                    "bridge": bridge_info,
                    "server_config": {
                        "host": config.bond_host,
                        "timeout": config.timeout,
                        "max_retries": config.max_retries
                    }
                }
        except BondAPIError as e:
            return {"error": f"Failed to get bridge info: {str(e)}"}
        except Exception as e:
            logger.error(f"Unexpected error getting bridge info: {e}")
            return {"error": f"Unexpected error: {str(e)}"}
  • The BondClient class method that executes the HTTP GET request to the Bond Bridge root endpoint to retrieve bridge information.
    async def get_bridge_info(self) -> Dict[str, Any]:
        """Get Bond Bridge information."""
        return await self._request("GET", "")
  • Pydantic model defining the structure of Bond Bridge information, matching the fields returned by the Bond API.
    class BridgeInfo(BaseModel):
        """Bond Bridge information model."""
        name: str
        location: Optional[str] = None
        bluelight: Optional[bool] = None
        mac: Optional[str] = None
        fw_ver: Optional[str] = None
        hw_ver: Optional[str] = None
        uptime_s: Optional[int] = None
        api: Optional[str] = None
        target: Optional[str] = None

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/madorn/bond-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server