Skip to main content
Glama

get_bridge_info

Retrieve Bond Bridge device information including version, uptime, and configuration status 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 primary handler function for the 'get_bridge_info' MCP tool. Decorated with @mcp.tool(), it fetches bridge information from the Bond Bridge via BondClient and includes server configuration.
    @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)}"}
  • Supporting method in BondClient class that makes an HTTP GET request to the Bond Bridge root endpoint ('') to retrieve raw bridge information.
    async def get_bridge_info(self) -> Dict[str, Any]: """Get Bond Bridge information.""" return await self._request("GET", "")
  • Pydantic model defining the expected structure of Bond Bridge information data, used for validation and typing in the codebase.
    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
  • The main() function that initializes and runs the MCP server with mcp.run(), which automatically registers all decorated tools including get_bridge_info.
    def main(): """Main entry point for the Bond MCP server.""" logger.info(f"Starting Bond MCP Server v{config.server_version}") logger.info(f"Connecting to Bond Bridge at {config.bond_host}") # Configure logging level logging.getLogger().setLevel(getattr(logging, config.log_level)) # Run the FastMCP server mcp.run()

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