# operations

Query

List operations for the current workspace, ordered newest first.

Available to agents as MCP tool `getOperations` — see [Read tools](/api/v2/docs/mcp/read-tools#get-operations).

## Arguments

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `after` | `String` | No | `null` | Cursor for fetching the next page of results. |
| `first` | `Int` | No | `20` | Number of operations to return (page size). |

## Returns

A paginated connection of [`OperationSummary`](/api/v2/docs/types/operation-summary) nodes. See [Pagination](/api/v2/docs/types/pagination) for the connection shape.

## Examples

### List operations

Paginate the workspace's background operations, newest first.

```graphql
query OperationsDefault($first: Int, $after: String) {
  operations(first: $first, after: $after) {
    totalCount
    edges {
      node {
        id
        status
        operationType
        total
        createdAt
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
```

Variables:

```json
{
  "first": 10
}
```

Response — HTTP 200:

```json
{
  "data": {
    "operations": {
      "totalCount": 2,
      "edges": [
        {
          "node": {
            "id": "57d0f9ea-ba8a-59c5-8f7b-2aba9a54e7aa",
            "status": "PROCESSING",
            "operationType": "refetch_engagement",
            "total": 1,
            "createdAt": "2024-12-31T23:00:00Z"
          }
        },
        {
          "node": {
            "id": "aeb032f4-179f-549f-b83c-3db2c5b58a2d",
            "status": "COMPLETED",
            "operationType": "refetch_engagement",
            "total": 1,
            "createdAt": "2024-12-31T22:00:00Z"
          }
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "endCursor": "Z2lkOi8vYXJjaGl2ZS9PcGVyYXRpb24vMjAyNC0xMi0zMVQyMjowMDowMC4wMDAwMDBafGFlYjAzMmY0LTE3OWYtNTQ5Zi1iODNjLTNkYjJjNWI1OGEyZA=="
      }
    }
  }
}
```
