api-device-list
Installation
SKILL.md
Device List Query API
POST /api/device/list is used to query all devices bound to the currently authenticated user. This API does not require a request body. The device list is automatically associated through the api_key.
⚠️ Display Rules (MUST Be Strictly Followed)
The script outputs structured data in JSON format, which is the expected behavior. The following display rules are formatting instructions for the agent: the agent MUST parse the JSON output from the script and convert it into a user-friendly format according to the rules below before displaying it, and MUST NOT display the raw JSON directly.
- When
code == 0anddatais not empty, display it as a table:
| MAC Address | Device Name |
|---|---|
| aabbccddeeff | Living Room Camera |
Key rule: device_id MUST remove the xxxxS_ prefix before being displayed as the MAC address. The table header MUST be written as "MAC Address" and MUST NOT be written as "Device ID".
- When
datais an empty array, reply: "There are no devices bound under the current account." - When
code != 0, reply: "API call failed, error code {code}, reason: {message}"