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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/bond_mcp/server.py:323-346 (handler)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)}"}
- src/bond_mcp/bond_client.py:100-102 (helper)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", "")
- src/bond_mcp/models.py:80-91 (schema)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