Skip to main content
Glama

Add data validation

add_data_validation

Restrict data entry in Excel ranges by adding validation rules such as dropdown lists, number/date limits, text length checks, or custom formulas.

Instructions

Restrict what can be entered in a range, e.g. a dropdown list.

Rule types: 'list' (options), 'whole', 'decimal', 'date' and 'text_length' (operator plus minimum, and maximum for between/notBetween; dates as 'DATE(2026,1,31)'), and 'custom' (a formula for the range's top-left cell).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to an .xlsx, .xlsm, .xltx or .xltm file. Relative paths are resolved in the server's workbook directory when one is configured; otherwise use an absolute path.
ruleYes
rangeYesA cell or rectangular range in A1 notation, e.g. 'A1:D20'.
sheetYesWorksheet name, e.g. 'Sheet1'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.1

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false), so the description only needs to add what they don't cover. It contributes the date literal syntax ('DATE(2026,1,31)') and the fact that a custom formula is evaluated against the range's top-left cell, which is genuinely useful, but it says nothing about whether existing validation on the range is overwritten, despite idempotentHint=false leaving that question open.

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?

The core behavior is front-loaded in a single sentence, followed by a compact rule-type reference block. Both sentences earn their place, with only mild density in the parenthetical clause about bounds and date syntax.

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?

An output schema exists, so return values need no explanation. For a four-parameter required write tool, the description covers the rule taxonomy well; the remaining gap is edge-case behavior (re-applying to an already-validated range, invalid A1 ranges), which is a minor omission rather than a blocker.

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 coverage is 75% and the nested rule object is well documented, but the description adds cross-field meaning the schema does not: minimum/maximum are tied to the between/notBetween operators, and operator usage is scoped to whole/decimal/date/text_length. That mapping is real value beyond the per-field descriptions.

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?

The description gives a specific verb+resource ('Restrict what can be entered in a range') with a concrete example (dropdown list), which is clearly distinct from siblings like add_conditional_format or format_range. It stops short of explicitly naming or contrasting with the nearest sibling, so it is clear but not differentiated.

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?

It enumerates the supported rule types, which implies when each variant applies, but never states when to choose this tool over alternatives or any prerequisites/exclusions. Usage is inferred from the rule taxonomy rather than stated.

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