# queue_status

> Release: 0.13.0 · Last changed: 2026-11-18 · Source: https://github.com/KeiaiLab/SwarmOps/blob/stable/docs/reference/mcp-tools/queue-status.md

The landing queue's entries, one target's or every target's or one entry, open ones in queue order first: each one's state, candidate, verdict and removal reason.

```yaml
title: "queue_status"
description: "Show the landing queue."
since: "0.13.0"
mutates: false
identity_required: false
cli_command: "swarmops queue status"
envelope_op: "queue_status"
request_type: "QueueStatusReq"
annotations: {"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true}
max_result_chars: null
```

## Input schema

`arguments` is a `QueueStatusReq`: `swarmops schema QueueStatusReq` prints the type. A field the type does not know is ignored.

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `entry` | string or null | no |  | Only this entry, by its id. |
| `target` | string or null | no |  | Only this target's entries; every target's when omitted. |

### JSON Schema

As `tools/list` gives it: each `$ref` replaced by its definition, so that it stands alone.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "`queue_status`: the entries of one target, or of every target, or one entry.",
  "properties": {
    "entry": {
      "description": "Only this entry, by its id.",
      "type": [
        "string",
        "null"
      ]
    },
    "target": {
      "description": "Only this target's entries; every target's when omitted.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "title": "QueueStatusReq",
  "type": "object"
}
```

## Annotations

It only reads the store.

| Annotation | Value | Meaning |
| --- | --- | --- |
| `destructiveHint` | `false` | True: a tool that changes the store may overwrite or delete what is there, not only add to it. |
| `idempotentHint` | `true` | True: calling it again with the same arguments changes nothing more. |
| `openWorldHint` | `false` | True: it reaches beyond a closed set of things. Every tool here stays inside the store. |
| `readOnlyHint` | `true` | True: the tool does not change its environment, the store. |

Its entry in `tools/list` carries no `_meta`.

## CLI command

[`swarmops queue status`](../commands/queue-status.md) runs the same operation and prints the same envelope.

## Examples

### MCP

```json
{
  "id": 6,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target": "main"
    },
    "name": "queue_status"
  }
}
```

```json
{
  "id": 6,
  "jsonrpc": "2.0",
  "result": {
    "content": [
      {
        "text": "{\"api\":1,\"meta\":{\"auth\":\"trust\",\"elapsed_ms\":\"[elapsed_ms]\",\"repo\":\"[tmp]/store\",\"resolved\":{}},\"ok\":true,\"op\":\"queue_status\",\"result\":{\"entries\":[{\"base\":\"[main]\",\"candidate\":\"[landed]\",\"check\":\"sh -c if [ -e slow ]; then sleep 3; fi; if [ -e bad ]; then exit 1; fi; exit 0\",\"head\":\"[first]\",\"id\":\"[entry1]\",\"key\":\"k-1\",\"landed\":\"[landed]\",\"state\":\"landed\",\"target\":\"main\",\"tree\":\"[id1]\",\"verdict\":\"passed\"},{\"base\":\"[main]\",\"head\":\"[second]\",\"id\":\"[entry2]\",\"removal\":\"withdrawn\",\"state\":\"removed\",\"target\":\"main\"}]}}",
        "type": "text"
      }
    ],
    "isError": false,
    "structuredContent": {
      "api": 1,
      "meta": {
        "auth": "trust",
        "elapsed_ms": "[elapsed_ms]",
        "repo": "[tmp]/store",
        "resolved": {}
      },
      "ok": true,
      "op": "queue_status",
      "result": {
        "entries": [
          {
            "base": "[main]",
            "candidate": "[landed]",
            "check": "sh -c if [ -e slow ]; then sleep 3; fi; if [ -e bad ]; then exit 1; fi; exit 0",
            "head": "[first]",
            "id": "[entry1]",
            "key": "k-1",
            "landed": "[landed]",
            "state": "landed",
            "target": "main",
            "tree": "[id1]",
            "verdict": "passed"
          },
          {
            "base": "[main]",
            "head": "[second]",
            "id": "[entry2]",
            "removal": "withdrawn",
            "state": "removed",
            "target": "main"
          }
        ]
      }
    }
  }
}
```

The server ran as `swarmops mcp --repo [tmp]/store --as agent/worker-17`, after `initialize`. Recorded by the MCP tests. A name in square brackets, such as `[tmp]` or `[c1]`, stands for what differs from run to run: the test's temporary directory, an id, a time, the version.

## Return information

A tool result: the envelope, whose `op` is `queue_status`, as `structuredContent` and again as the text of its one `content` block. `isError` is true exactly when the envelope's `ok` is false. On success the envelope's `result` is what [`swarmops queue status`](../commands/queue-status.md#return-information) returns.

## Errors

A failed call is a tool result with `isError: true`; the envelope's `error.code` is one of the [error codes](../errors.md).

- [`E_INVALID_ARG`](../errors.md#e_invalid_arg): arguments that do not fit `QueueStatusReq`, a field named twice among them included, or that break one of the server's own rules.
- [`E_NOT_A_REPO`](../errors.md#e_not_a_repo): the server's store is not there; the server serves on.
- [`E_INTERNAL`](../errors.md#e_internal): the operation panicked, a bug.

Then the errors of the operation, as [`swarmops queue status`](../commands/queue-status.md#errors) lists them.

## See also

- [`swarmops queue status`](../commands/queue-status.md)
- [MCP tools](README.md)
- [MCP integration](../../develop/mcp.md)
- [Error codes](../errors.md)
