Skip to main content
Glama

list_devices

Retrieve all connected Bond Bridge smart home devices to manage ceiling fans, shades, lights, and other RF-controlled equipment.

Instructions

List all Bond devices connected to the bridge.

Returns: Dictionary containing all devices with their basic information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'list_devices'. Uses FastMCP @mcp.tool() decorator for registration. Fetches devices via BondClient, filters metadata, transforms to simplified structure with id, name, type, location, and returns count.
    @mcp.tool() async def list_devices() -> Dict[str, Any]: """List all Bond devices connected to the bridge. Returns: Dictionary containing all devices with their basic information. """ try: async with await get_bond_client() as client: devices_data = await client.list_devices() # Transform the data for better readability devices = {} for device_id, device_info in devices_data.items(): if not device_id.startswith('_'): # Skip metadata devices[device_id] = { "id": device_id, "name": device_info.get("name", "Unknown"), "type": device_info.get("type", "Unknown"), "location": device_info.get("location", "") } return { "devices": devices, "total_count": len(devices) } except BondAPIError as e: return {"error": f"Failed to list devices: {str(e)}"} except Exception as e: logger.error(f"Unexpected error listing devices: {e}") return {"error": f"Unexpected error: {str(e)}"}
  • BondClient helper method implementing the core API call: HTTP GET to Bond Bridge /v2/devices endpoint to retrieve raw device data.
    async def list_devices(self) -> Dict[str, Any]: """List all devices connected to the Bond Bridge.""" return await self._request("GET", "devices")

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