list_clients
Lists online devices for a client token and can wait up to 20 seconds until a device connects, returning immediately when online; omit wait_ms for an instant snapshot.
Instructions
List online devices belonging to this client_token. Set wait_ms=20000 to wait server-side while no device is online; a connection returns immediately. After creating an invitation, show display_text in a progress message and keep calling with wait_ms=20000 until the target connects, the invitation expires, or the user cancels. An empty result is only a wait timeout: continue waiting without ending the turn or asking the user to check. Immediately notify the user when connected. With wait_ms omitted or 0, return a snapshot immediately. Use client_id to execute commands or start sessions. For multi-device tokens, any online device completes the wait; use snapshots to discover additional devices.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait_ms | No | Wait up to this many milliseconds while no device is online (0-20000, default 0). After creating an invitation, use 20000 and repeat empty results until connection, invitation expiry, or user cancellation. | |
| client_token | Yes | Target client connection token, required with management access (including stdio and no-password mode). Device-scoped bearer access implicitly selects its own token. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Connection wait status: waiting or connected. Session-stop status: stopping, stopped or finished. | |
| clients | Yes | Online devices owned by this token; an empty array means none are currently online. | |
| next_action | No | Next step to perform. Invitation creation returns the exact tool call and deadline; other tools return human-readable guidance. |