Skip to main content
Glama

set_data_validation

Applies list, number, decimal, text-length, or date validation rules to an Excel range, restricting cell entries and helping keep live spreadsheet data accurate.

Instructions

Set a data validation rule on a range. Supports list, wholeNumber, decimal, textLength, and date rules.

Input Schema

NameRequiredDescriptionDefault
listNoList type: comma-separated values, e.g. "Low,Medium,High".
typeYesValidation type.
rangeYesA1 range address.
formula1NoNumeric/date/textLength: bound value or formula.
formula2NoSecond bound for Between/NotBetween.
operatorNoNumeric/date/textLength: comparison operator.
sheetNameNoWorksheet name. Defaults to the active worksheet.
allowBlankNoAllow blank cells. Default true.
workbookIdNoTarget workbook ID from list_workbooks. Optional when only one workbook is connected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden. It says nothing about mutation effects, whether an existing rule is overwritten, permission requirements, or what is returned; the type list merely restates the schema enum.

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?

Two sentences with the core action front-loaded and no padding. The second sentence is arguably redundant with the schema enum, which keeps it just under a 5.

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

Completeness2/5

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

For a 9-parameter mutation tool with no annotations and no output schema, the description is too thin: overwrite behavior, conditional parameter requirements, and result/error semantics are all unaddressed.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter (including the conditional relationship between type and formula1/operator) is already documented. The description adds no field-level meaning beyond the schema, so the baseline 3 applies.

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?

States a specific verb and resource ('Set a data validation rule on a range') and enumerates the supported rule types, which matches the schema enum. It is clear but does not differentiate itself from nearby Excel siblings such as add_conditional_format.

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

Usage Guidelines2/5

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

No indication of when to choose this over add_conditional_format or other range-mutating tools, no prerequisites (workbook connection, worksheet existence), and no note about what happens if the range already has validation.

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