Skip to main content
Glama

protect_sheet

Protect an Excel sheet to prevent editing of locked cells, with optional password and permissions for formatting, sorting, or filtering.

Instructions

Protect a sheet so locked cells cannot be edited in Excel.

All cells are locked by default — use set_cell_locked(range, locked=false) BEFORE protecting to keep specific cells editable. The allow_* flags let users still format, sort, or filter while protected. A password (optional) is required to unprotect in Excel; note this is Excel's standard sheet protection, a deterrent rather than encryption.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sheetNo
passwordNo
session_idYes
allow_sortingNo
allow_filteringNo
allow_formattingNo
allow_select_locked_cellsNo
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that password is optional, required to unprotect in Excel, and that protection is a deterrent. Adds context about Excel's standard sheet protection.

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

Conciseness5/5

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

Description is concise, front-loaded with the main purpose, then adds prerequisite and caveats in a logical order. Every sentence adds value with no redundancy.

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 the core workflow (pre-unlock, allow flags, password) and identifies Excel's protection nature. Could mention that protection applies to the specified sheet or explain the default for allow_select_locked_cells, but overall sufficient for 7 parameters.

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 0%, so description must compensate. It explains the allow_* flags generically but does not detail each parameter individually (e.g., allow_filtering, allow_formatting). The sheet and password parameters are only implied.

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 verb 'Protect' and resource 'sheet', and explains the effect: locked cells cannot be edited. It distinguishes from sibling tools like 'unprotect_sheet' by its function.

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

Usage Guidelines4/5

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

Provides explicit prerequisite: use 'set_cell_locked' before protecting to keep cells editable. Explains the allow_* flags purpose. Lacks explicit when-not-to-use or alternatives beyond the prerequisite.

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/ShubhamDbug/Excel-MCP'

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