# machines_list

The owner's machines: name, id, `state` (online; stale = linked, not answering; paused; offline), `last_seen`, `activity`, `tools`, build, `behind` (newer release out). Only online ones take calls.

**In short:** A [server tool](https://docs.cmdop.ai/reference/tools.md#server-tools): the server answers it from its own record, so it works while every machine is off. Over MCP call `machines_list`; over HTTP send `"tool": "machines_list"` to [`POST /api/v1/call`](https://docs.cmdop.ai/reference/http/post-call.md) without `machine`.

## Arguments

No arguments.

## Result

The result has no fields.

## Examples

**MCP**

```json
{
  "name": "machines_list",
  "arguments": {}
}
```

**HTTP**

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

## Limits

The token is the only check: no risk class applies, and the call is not counted against the plan. A call with `machine` set, or with `sealed` instead of `args`, returns [`bad_args`](https://docs.cmdop.ai/reference/errors/bad_args.md). A refused call returns one of the [error codes](https://docs.cmdop.ai/reference/errors.md).

## Notes

`state` is one of:

| State | Meaning |
|---|---|
| `online` | Connected and answering: calls go through. |
| `stale` | Connected, but nothing heard from it for more than 50 seconds: asleep, frozen or cut off. |
| `paused` | Its owner paused it: no tool runs until they resume it on the machine. |
| `offline` | Not connected: off, asleep, or cmdop is not running on it. |

Call `machines_list` before a machine tool. Only an `online` machine takes calls: for any other
state, tell the user instead of retrying. A call to it returns [`offline`](https://docs.cmdop.ai/reference/errors/offline.md)
(with `details.reason` `stale` or `no_link`) or [`paused`](https://docs.cmdop.ai/reference/errors/paused.md) at once, and a
call already waiting on a machine that goes quiet ends with `offline` when it turns `stale`.
