> ## 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_preview_bulk_rows

> Preview 1–200 revision-bound records for a field patch, duplication with regenerated automatic IDs, or deletion. Validate native constraints and roll back every simulated effect. Return row-specific conflicts and a bounded sample; no records or counters change.

## Workflow

```mermaid theme={"system"}
flowchart LR
  discover["Read the table schema"] --> invoke["Preview bulk rows"]
  invoke --> outcome["Read the result"]
```

## Access and behavior

Requires a current workspace role of **Member** or higher. The connection needs `rows:write` scope.

* This tool reads data without changing it.
* Read the current table schema before supplying `expectedSchemaVersion`.

## Arguments

| Argument | Required | Type | Details |
| - | - | - | - |
| `expectedSchemaVersion` | Yes | integer | Current version returned by the table schema. |
| `rows` | Yes | array of object | — |
| `action` | Yes | JSON value | — |
| `orgId` | Yes | string | Workspace ID returned by rootset\_get\_context. |
| `databaseId` | Yes | string | ID of the database to work with. |
| `tableId` | Yes | string | ID of the table to work with. |

<Accordion title="Complete input schema">
  ```json theme={"system"}
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "expectedSchemaVersion": {
        "type": "integer",
        "minimum": 1,
        "maximum": 2147483647
      },
      "rows": {
        "minItems": 1,
        "maxItems": 200,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "rowId": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            },
            "expectedVersion": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,18}$"
            }
          },
          "required": ["rowId", "expectedVersion"],
          "additionalProperties": false
        }
      },
      "action": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "set"
              },
              "values": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "additionalProperties": {
                  "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": {}
                    }
                  ]
                }
              }
            },
            "required": ["type", "values"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "duplicate"
              }
            },
            "required": ["type"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "delete"
              }
            },
            "required": ["type"],
            "additionalProperties": false
          }
        ]
      },
      "orgId": {
        "type": "string",
        "pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "databaseId": {
        "type": "string",
        "pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "tableId": {
        "type": "string",
        "pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      }
    },
    "required": [
      "expectedSchemaVersion",
      "rows",
      "action",
      "orgId",
      "databaseId",
      "tableId"
    ],
    "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_preview_bulk_rows",
    "arguments": {
      "expectedSchemaVersion": 1,
      "rows": [
        {
          "rowId": "01J00000000000000000000003",
          "expectedVersion": "1"
        }
      ],
      "action": {
        "type": "set",
        "values": {
          "NAME": "Updated name"
        }
      },
      "orgId": "01J00000000000000000000000",
      "databaseId": "01J00000000000000000000001",
      "tableId": "01J00000000000000000000002"
    }
  }
}
```

## 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/previewBulkRows) 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.