# updateViewGroup

Mutation

Rename a user-created view group.

Available to agents as MCP tool `updateViewGroup` — see [Write tools](/api/v2/docs/mcp/write-tools#update-view-group).

## Arguments

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `id` | `ID!` | Yes | — | UUID of the view group to rename. |
| `input` | [`UpdateViewGroupInput!`](/api/v2/docs/types/update-view-group-input) | Yes | — | Update input. `name` is the only mutable field today. |

## Returns

| Name | Type | Description |
| --- | --- | --- |
| `userErrors` | [`[UserError!]!`](/api/v2/docs/types/user-error) | List of user-facing validation errors. Empty on success. |
| `viewGroup` | [`ViewGroup`](/api/v2/docs/types/view-group) | The renamed view group. Null on not-found or validation failure. |

## Examples

### Rename a view group

Rename a user-created view group.

```graphql
mutation UpdateViewGroupDefault($id: ID!, $input: UpdateViewGroupInput!) {
  updateViewGroup(id: $id, input: $input) {
    viewGroup {
      id
      name
    }
    userErrors {
      field
      message
    }
  }
}
```

Variables:

```json
{
  "id": "8e0f0ff1-8024-5af5-9506-49091f53a920",
  "input": {
    "name": "Northwind Sidebar (Renamed)"
  }
}
```

Response — HTTP 200:

```json
{
  "data": {
    "updateViewGroup": {
      "viewGroup": {
        "id": "8e0f0ff1-8024-5af5-9506-49091f53a920",
        "name": "Northwind Sidebar (Renamed)"
      },
      "userErrors": []
    }
  }
}
```
