Skip to main content
Glama
senoff

xlsx-for-ai

xlsx_protection

Read-onlyIdempotent

Identify locked cells, sheets, and workbook settings in .xlsx files to avoid editing protected content. Audit which cells are fillable before suggesting changes.

Instructions

Surface every protection setting in a LOCAL .xlsx file so an agent knows what it can and cannot edit. Workbook-level (lockStructure, lockWindows), per-sheet (protected? password? hidden state?), per-action allow/block list (formatCells, sort, insertRows, pivotTables, etc.), and per-cell unlocked / hidden samples — these are the cells a human would actually be allowed to type into when the sheet is otherwise read-only.

Reads sheetProtection action attrs directly from the OOXML zip (workaround for ExcelJS stripping them on round-trip).

USE WHEN: an agent is about to suggest edits and you want to fail fast on cells / sheets the user can't change anyway. Or auditing a "submitted form" workbook to see which inputs the author intended fillable.

DO NOT USE WHEN: just reading values (use xlsx_read). Or trying to BREAK protection (this surfaces what's locked; it does not unlock).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_b64Yes
optionsNo
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, openWorldHint=true. The description adds value by explaining the direct OOXML zip reading method (workaround for ExcelJS issues) and clarifying that it does not unlock protection. No contradictions.

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 description is well-structured with clear sections (overview, technical detail, usage guidance). It is reasonably concise for the complexity of the tool, though could be slightly trimmed. The front-loading of purpose is effective.

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?

Covers workbook-level, per-sheet, per-action, and per-cell protections, and explains the OOXML reading method. Lacks details about return format but this is acceptable without an output schema. Nearly complete for a tool of this complexity.

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

Parameters2/5

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

Input schema has 2 parameters with 0% description coverage. The description mentions 'local .xlsx file' for file_b64 and implies per-sheet via 'per-sheet', but does not explicitly describe the parameters' types, formats, or optionality (e.g., options.sheet). Since schema provides no descriptions, the tool definition should compensate but falls short.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Surface every protection setting in a LOCAL .xlsx file so an agent knows what it can and cannot edit.' It lists specific aspects covered (workbook-level, per-sheet, per-action, per-cell) and distinguishes from sibling xlsx_read by specifying it is for reading values only.

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

Usage Guidelines5/5

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

Provides explicit USE WHEN and DO NOT USE WHEN sections. It advises use before suggesting edits or auditing forms, and warns against using for just reading values (use xlsx_read) or attempting to break protection. This clear guidance helps the agent decide when to invoke.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/senoff/xlsx-for-ai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server