Skip to main content
Glama
dudegladiator

Google Sheets MCP Server

write_cells

Write values and formulas to Google Sheets cells by specifying a starting cell and a 2D array of data.

Instructions

Write values to cells. Supports formulas (start with =).

Examples: - write_cells("abc123", "Sheet1!A1", '[["Name", "Age"], ["Alice", 30]]') - write_cells("abc123", "Sheet1!E1", '[["=SUM(A1:D1)"], ["=SUM(A2:D2)"]]') - write_cells("abc123", "A1", '[["Header1", "Header2", "Header3"]]')

Args: spreadsheet_id: The ID from the spreadsheet URL. range_notation: Starting cell in A1 notation (e.g., "Sheet1!A1"). values: JSON 2D array. Each inner array is a row. Formulas: use "=SUM(A1:A10)", "=AVERAGE(B:B)", etc.

Returns: JSON with updated_cells count and updated_range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valuesYes
range_notationYes
spreadsheet_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It mentions formula support and returns, but does not disclose side effects like overwriting existing cell values or what happens if the provided array is smaller than the range. This is a significant gap for a write operation.

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?

The description is well-structured with a short summary, practical examples, a clear Args section, and a Returns note. Every sentence and example adds value, making it concise despite its moderate length.

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?

The description covers all parameters, provides return value information, and includes realistic usage examples. However, it lacks guidance on when to use the tool versus siblings and omits side-effect behavior, leaving minor ambiguity for a mutation tool with no annotations.

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

Parameters5/5

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

The Args section provides full detail for all three parameters beyond the schema: spreadsheet_id as 'The ID from the spreadsheet URL', range_notation as 'Starting cell in A1 notation', and values as 'JSON 2D array' with formula examples. This fully compensates for the schema's 0% description coverage.

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: 'Write values to cells.' It provides multiple examples showing the expected input format and distinguishes itself from sibling tools like read_cells and clear_cells.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives such as batch_write, append_rows, or clear_cells. The examples demonstrate invocation but do not outline selection criteria or exclusions.

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/dudegladiator/spreadsheet-mcp'

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