Skip to main content
Glama

get_data_validation

Read-only

Reads existing data validation rules for a cell range and returns each cell's rule, omitting cells without one. Use it to audit validation settings in a sheet.

Instructions

Read existing data validation rules for a cell range.

Args: spreadsheet_id: The ID of the spreadsheet sheet: The name of the sheet range: A1 notation range to inspect (e.g. "A1:A100")

Returns: List of {cell, rule} for every cell in the range that has a validation rule; cells without one are omitted. 'rule' matches the Sheets API's DataValidationRule shape: {condition: {type, values}, inputMessage, strict, showCustomUi}. Returns {"error": ...} if the sheet isn't found.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
rangeYes
sheetYes
spreadsheet_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already supply readOnlyHint=true, so the safety profile is covered. The description adds real behavioral context beyond that: cells without a rule are omitted from the result, and a missing sheet returns an {"error": ...} object rather than raising, which is useful for an agent deciding how to handle failures.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded purpose sentence followed by tidy Args/Returns blocks. The Args section is justified by the empty schema descriptions, though the Returns block partly restates what the output schema already declares.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple three-parameter read tool with an output schema, the definition covers all inputs, the filtering behavior, and the error case. The only minor gap is the lack of explicit guidance about when to choose this over the add/clear siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry parameter meaning, and its Args block documents all three parameters. The range parameter gets an A1-notation example ("A1:A100"), while spreadsheet_id and sheet are only trivially restated, keeping it just short of full compensation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource: 'Read existing data validation rules for a cell range.' This clearly distinguishes it from the mutating siblings add_data_validation and clear_data_validation, though those siblings are never named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The read-only framing implies when to use it versus the add/clear siblings, but there is no explicit when-to-use statement or named alternative. The agent must infer the routing from the verb and sibling names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools