Skip to main content
Glama

get_device_state

Retrieve the current operational status of a Bond Bridge smart home device, including power state, speed, direction, and other real-time parameters.

Instructions

Get current state of a Bond device.

Args: device_id: The Bond device identifier

Returns: Current device state including power, speed, direction, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idYes

Implementation Reference

  • MCP tool handler for get_device_state: fetches and returns the current state of the specified Bond device.
    @mcp.tool() async def get_device_state(device_id: str) -> Dict[str, Any]: """Get current state of a Bond device. Args: device_id: The Bond device identifier Returns: Current device state including power, speed, direction, etc. """ try: async with await get_bond_client() as client: state = await client.get_device_state(device_id) return { "device_id": device_id, "state": state } except BondAPIError as e: return {"error": f"Failed to get device state: {str(e)}"} except Exception as e: logger.error(f"Unexpected error getting device state: {e}") return {"error": f"Unexpected error: {str(e)}"}
  • BondClient helper method that makes the HTTP GET request to the Bond API endpoint for the device's state.
    async def get_device_state(self, device_id: str) -> Dict[str, Any]: """Get current state of a device. Args: device_id: Device identifier Returns: Device state """ return await self._request("GET", f"devices/{device_id}/state")

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