# set_data_validation

Sets — or clears — a data-validation rule on a grid range. With condition_type set, every cell in the range gets the rule: ONE_OF_LIST with condition_values plus show_custom_ui=true is the classic in-cell dropdown; ONE_OF_RANGE takes a "=Sheet1!A1:A10" formula; NUMBER_/TEXT_/DATE_ conditions restrict input; CUSTOM_FORMULA takes a formula evaluated per cell. strict=true rejects invalid input outright, strict=false only shows a warning; input_message is the help text shown on the cell. OMIT condition_type (and the other rule fields) to REMOVE validation from the range. Overwrites any previous rule on the range — one rule per cell.

Agent View of the PolicyLayer registry record for `set_data_validation`. HTML page: https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/set-data-validation

## Facts

- Tool: `set_data_validation`
- Server: Mcp Google Sheets (`@a1-x-tech/mcp-google-sheets`) — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets.md
- Install: `npx -y @a1-x-tech/mcp-google-sheets`
- Homepage: https://github.com/A1-x-Tech/mcp-google-sheets
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 7 (2 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `range` | object | yes | Cell rectangle in grid coordinates: rows 1-10 × columns A-B = {start_row_index:0, end_row_index:10, start_column_index:0, end_column_index:2}. |
| `strict` | boolean | no | true rejects invalid input; false (default) shows a warning. |
| `input_message` | string | no | Help text shown when the cell is selected. |
| `condition_type` | string | no | Sheets API condition type, e.g. ONE_OF_LIST, ONE_OF_RANGE, NUMBER_GREATER, NUMBER_LESS, NUMBER_BETWEEN, NUMBER_EQ, TEXT_CONTAINS, TEXT_STARTS_WITH, TEXT_EQ, TEX |
| `show_custom_ui` | boolean | no | Show a dropdown UI for ONE_OF_LIST / ONE_OF_RANGE conditions. |
| `spreadsheet_id` | string | yes | The spreadsheet id — the long id from the URL (docs.google.com/spreadsheets/d/<spreadsheetId>/edit) or from create_spreadsheet / search_spreadsheets output. |
| `condition_values` | array | no | Condition arguments: list items for ONE_OF_LIST (["Yes","No"]), one number for NUMBER_GREATER (["100"]), two for NUMBER_BETWEEN, "=A1>B1"-style formula for CUST |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_data_validation",
    "arguments": {
      "range": {},
      "spreadsheet_id": "<spreadsheet_id>"
    }
  }
}
```

## Why set_data_validation is rated Medium

Modifies spreadsheet validation rules reversibly; affects data integrity but not destruction.

From the tool's own definition: "Sets or clears data-validation rule on grid range; overwrites previous rule."

Risk signals: High parameter count (12 properties) · Bulk/mass operation — affects multiple targets

## Use case

AI agents use set_data_validation to create or update resources in Mcp Google Sheets, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Mcp Google Sheets environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Mcp Google Sheets:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "set_data_validation": {
      "limits": [
        {
          "counter": "set_data_validation_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Mcp Google Sheets (19)

- `clear_values` — Destructive — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/clear-values.md
- `manage_dimensions` — Destructive — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/manage-dimensions.md
- `manage_sheets` — Destructive — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/manage-sheets.md
- `raw_request` — Execute — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/raw-request.md
- `append_values` — Read — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/append-values.md
- `get_spreadsheet` — Read — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/get-spreadsheet.md
- `read_values` — Read — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/read-values.md
- `search_spreadsheets` — Read — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/search-spreadsheets.md
- `batch_write_values` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/batch-write-values.md
- `create_spreadsheet` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/create-spreadsheet.md
- `format_cells` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/format-cells.md
- `manage_charts` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/manage-charts.md
- `manage_conditional_formats` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/manage-conditional-formats.md
- `manage_permissions` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/manage-permissions.md
- `manage_protected_ranges` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/manage-protected-ranges.md
- `manage_tables` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/manage-tables.md
- `set_borders` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/set-borders.md
- `set_frozen` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/set-frozen.md
- `write_values` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-sheets/write-values.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=a1-x-tech-mcp-google-sheets · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/a1-x-tech-mcp-google-sheets
