On this page
TOOLscope: devices:read · readOnlyHint
list_devices
Returns only the devices allowed for this connection: device ID, alias, kind, and connection status. An empty list almost always means the user has not granted this agent any devices yet.
Arguments
None. Call it with {}.
Returns
devices[].device_idstring
Opaque ID. Never contains manufacturer identifiers.
devices[].aliasstring | null
The name the user gave the device in the dashboard.
devices[].kindstring
air_conditioner, smart_plug, lock, vehicle, dishwasher, …
devices[].connection_statusenum
online, offline or unknown as last reported by the manufacturer.
Request
REQUESTTypeScript ▾
await client.callTool({ name: "list_devices", arguments: {} });RESPONSE · structuredContent
{
"devices": [
{ "device_id": "dev_8kq2", "alias": "Counter AC", "kind": "air_conditioner", "connection_status": "online" },
{ "device_id": "dev_m31f", "alias": "Coffee machine plug", "kind": "smart_plug", "connection_status": "online" },
{ "device_id": "dev_c0de", "alias": "GLE 450", "kind": "vehicle", "connection_status": "unknown" }
]
}Errors
Errors before a command is created return isError: true with command_id: null. Problems after creation are a command status, not an error. Full list: Errors.
| Code | When | What to do |
|---|---|---|
| PERMISSION_DENIED | The grant was revoked | Ask the user to add the agent again |
- PERMISSION_DENIED
- WhenThe grant was revoked
- What to doAsk the user to add the agent again