Skip to main content
Glama

Manage protected ranges

manage_protected_ranges
Destructive

Add, update, or delete protected ranges in Google Sheets to control who can edit specific cells.

Instructions

Manages protections that stop other editors from changing cells. action=add protects a grid range (or a named range via named_range_id; a range with only sheet_id protects the whole sheet): warning_only=true merely warns before edits, otherwise only the listed editor_users/editor_groups (emails) plus the owner may edit — note the calling user is NOT added automatically. Returns the new protectedRangeId in the replies. action=update changes description/warning_only/editors of an existing protection (protected_range_id required; provided fields replace the old values). action=delete removes the protection — the cells and data stay, but anyone with edit access can change them again. Find existing protectedRangeIds via get_spreadsheet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangeNoadd: the cells to protect.
actionYesWhat to do with the protections.
descriptionNoLabel shown in the Sheets UI protections list.
editor_usersNoEmails of users allowed to edit the protected cells.
warning_onlyNotrue = anyone can still edit after a warning; false = only the listed editors.
editor_groupsNoEmails of Google Groups allowed to edit.
named_range_idNoadd: protect a named range instead of a grid range.
spreadsheet_idYesThe spreadsheet id — the long id from the URL (docs.google.com/spreadsheets/d/<spreadsheetId>/edit) or from create_spreadsheet / search_spreadsheets output.
protected_range_idNoupdate/delete: the protection's id from get_spreadsheet or the add reply.
Behavior4/5

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

Annotations already provide readOnlyHint=false and destructiveHint=true. The description adds important context: action=delete removes protection but keeps data intact, the calling user is NOT automatically added as an editor, and warning_only behavior. It does not explicitly warn about potential data exposure or irreversible updates, but it adds meaningful behavioral detail.

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 dense but well-organized: it structures content by action and front-loads the purpose. It is longer than average, but each clause conveys a meaningful behavioral constraint or workflow hint. Some repetition of schema details (emails, editor_groups) could be trimmed, but overall it earns its length.

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

Completeness5/5

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

For a mutating tool with no output schema, the description covers action semantics, required parameters per action, the effect of delete on data, editor authorization rules, and how to discover existing protections. It also hints at the return value (new protectedRangeId). No critical information is missing for an agent to select and use the tool correctly.

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 100%, so baseline is 3. The description adds value by explaining action-specific required parameters (protected_range_id for update/delete, named_range_id versus range for add), and clarifies that in update mode provided fields replace old values. It also brings attention to the caller-not-automatically-added nuance that the schema does not express.

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 it manages protections that stop other editors from changing cells, with explicit action=add/update/delete semantics. It distinguishes itself from sibling tools focused on formatting, values, or permissions by naming the resource (protected ranges) and behavioral outcome.

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?

The description explains when to use each action and provides a pointer to get_spreadsheet for finding protectedRangeIds. It implies this tool is for protecting ranges rather than editing cells or managing general permissions, but does not explicitly mention alternative tools to avoid.

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/A1-x-Tech/mcp-google-sheets'

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