Skip to main content
Glama
xlsx-for-ai

xlsx-for-ai

by senoff

xlsx_session_set_validations

Idempotent

Configure per-session data-validation rules so subsequent spreadsheet operations in the same session enforce the specified sheet, range, and validation type.

Instructions

Use this when you need to configure per-session data-validation rules the server applies to subsequent calls in the same session.

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": {
      "session_id": "<session_id>",
      "validations": "<validations>"
    },
    "name": "xlsx_session_set_validations"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYesSession identifier returned by the session-create surface. 16-128 chars.
validationsYesList of validation rules to apply. Each rule names a sheet, a cell ref (e.g., "A1:A100"), and a type (whole|decimal|list|date|time|textLength|custom).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv4.3.1
    • addedInput schema / properties / session_id / description
      Added value: +"Session identifier returned by the session-create surface. 16-128 chars."
    • addedInput schema / properties / validations / description
      Added value: +"List of validation rules to apply. Each rule names a sheet, a cell ref (e.g., \"A1:A100\"), and a type (whole|decimal|list|date|time|textLength|custom)."
    • removedInput schema / properties / validations / items / additionalProperties
      Removed value: -true
    • addedInput schema / properties / validations / items / properties / ref / description
      Added value: +"A1-style cell range the rule applies to."
    • addedInput schema / properties / validations / items / properties / sheet / description
      Added value: +"Target sheet name."
    • addedInput schema / properties / validations / items / properties / type / description
      Added value: +"Validation type. Server-side enum: whole, decimal, list, date, time, textLength, custom."
    • changedInput schema / properties / validations / items / required
      Previous value: -[
      -  "ref",
      -  "sheet",
      -  "type"
      -]New value: +[
      +  "sheet",
      +  "ref",
      +  "type"
      +]
  2. First observedv3.2.1

TDQS

B3.4/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, idempotentHint=true), and the description adds the genuinely useful fact that rules affect subsequent calls within the same session. It still does not say whether 'set' replaces or merges with previously registered rules, whether stored rules persist to the file, or what happens when a rule is rejected.

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?

A single front-loaded sentence with no filler, and the session-scoping qualifier arrives early. The 'Use this when you need to' framing is slightly boilerplate but costs little.

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

Completeness3/5

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

For a stateful configuration mutation with no output schema and fully documented parameters, the description covers the core purpose but omits the semantics an agent most needs: replace-vs-append behavior and the effect on later calls' failures. Adequate but with clear gaps.

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 the schema already documents session_id, the rule array, and each rule's sheet/ref/type fields including the enum values. The description contributes no additional parameter meaning, 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?

Clear verb ('configure') plus a specific resource ('per-session data-validation rules') and a stated scope ('the server applies to subsequent calls in the same session'). It does not name the sibling xlsx_data_validations, which is the likely alternative for workbook-level validations, so the differentiation is implicit rather than explicit.

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 opening 'Use this when you need to configure per-session data-validation rules' is a when-to-use statement, and 'subsequent calls in the same session' hints at the session-scoped scenario. However, there is no when-not-to-use guidance, no mention of prerequisites (a session must already exist), and no pointer to xlsx_data_validations for persistent validations.

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