> ## Documentation Index
> Fetch the complete documentation index at: https://www.rootset.app/llms.txt
> Use this file to discover all available pages before exploring further.

# rootset_update_view_preferences

> Save table view preferences without changing data/schema.

## Workflow

```mermaid theme={"system"}
flowchart LR
  discover["Read the table schema"] --> invoke["Update view preferences"]
  invoke --> outcome["Read the result"]
```

## Access and behavior

Use a personal OAuth connection for the signed-in account. The connection needs `rows:read` scope.

* This tool changes data or starts work. Confirm the target and input before calling it.
* Keep the same `idempotencyKey` when retrying an unchanged request; use a new key for different input.

## Arguments

| Argument | Required | Type | Details |
| - | - | - | - |
| `tableId` | Yes | string | ID of the table to work with. |
| `preferences` | Yes | object | — |
| `idempotencyKey` | Yes | string | Stable caller-provided key across retries of this exact operation. |

<Accordion title="Complete input schema">
  ```json theme={"system"}
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "tableId": {
        "type": "string",
        "pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "preferences": {
        "type": "object",
        "properties": {
          "columnOrder": {
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          "columnWidths": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "number",
              "minimum": 40,
              "maximum": 2000
            }
          },
          "frozenColumns": {
            "type": "integer",
            "minimum": 0,
            "maximum": 200
          },
          "hiddenColumns": {
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          "query": {
            "description": "Any finite JSON value. Cell size/depth and typed numeric policies are enforced by the domain validator.",
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "boolean"
              },
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {}
              },
              {
                "type": "object",
                "additionalProperties": {}
              }
            ]
          },
          "foreignKeyDisplayFields": {
            "description": "Personal picker labels. Change through updateForeignKeyDisplayField; ordinary view saves preserve these choices.",
            "type": "object",
            "propertyNames": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            },
            "additionalProperties": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          }
        },
        "required": [
          "columnOrder",
          "columnWidths",
          "frozenColumns",
          "hiddenColumns"
        ],
        "additionalProperties": false
      },
      "idempotencyKey": {
        "type": "string",
        "minLength": 8,
        "maxLength": 255,
        "description": "Stable caller-provided key across retries of this exact operation."
      }
    },
    "required": ["tableId", "preferences", "idempotencyKey"],
    "additionalProperties": false
  }
  ```
</Accordion>

## Example call

Your client initializes the MCP connection before this call. Example identifiers and values are illustrative; use the IDs, schema version and values from your installation.

```json theme={"system"}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "rootset_update_view_preferences",
    "arguments": {
      "tableId": "01K6J7B8000000000000000000",
      "preferences": {
        "columnOrder": [],
        "columnWidths": {},
        "frozenColumns": 0,
        "hiddenColumns": []
      },
      "idempotencyKey": "example-request-0001"
    }
  }
}
```

## Result

Read the structured result returned by the tool. A tool failure sets `isError`; do not treat an error as a completed operation. The [REST operation](/api-reference/updateViewPreferences) documents the corresponding result fields and errors.

[Connect an MCP client](/mcp-guide) · [REST conventions](/api-reference/overview)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.