# window_list

Windows of the apps on screen, front to back: id, app, title, bounds in screen points, focus, whether visible, and whether `control` is allowed for the app.

**In short:** Risk class [`screen`](https://docs.cmdop.ai/reference/tools.md#risk-classes). Over MCP call `window_list`; over HTTP send `"tool": "window_list"` to [`POST /api/v1/call`](https://docs.cmdop.ai/reference/http/post-call.md).

## Arguments

Over MCP every tool also takes `machine`: the machine's name or id, optional when only one machine is online.

| Name | Type | Required | Meaning |
| --- | --- | --- | --- |
| `app` | `string` | no | Only windows of this app (name or bundle id). |

## Result

| Name | Type | Required | Meaning |
| --- | --- | --- | --- |
| `truncated` | `boolean` | yes |  |
| `windows` | `object[]` | yes |  |

## Examples

**MCP**

```json
{
  "name": "window_list",
  "arguments": {
    "machine": "<machine>"
  }
}
```

**HTTP**

```bash
curl -sS -X POST "https://<contour>.cmdop.ai/api/v1/call" \
  -H "Authorization: Bearer $CMDOP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"machine":"<machine>","tool":"window_list","args":{}}'
```

## Limits

The call times out after 10 s (`timed_out`). Available since version 0.0.2. A refused or failed call returns one of the [error codes](https://docs.cmdop.ai/reference/errors.md).
