Skip to main content
Glama
Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Modify Sheet Values

modify_sheet_values
Destructive

Writes, updates, clears, copies, or inserts Smart Chips in a specified Google Sheets range, enabling cell value changes from an MCP client.

Instructions

Modifies values in a specific range of a Google Sheet - can write, update, or clear values, insert Smart Chips (Drive files/folders or People), or copy another range into it.

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": {
      "user_google_email": "<user_google_email>",
      "spreadsheet_id": "<spreadsheet_id>",
      "range_name": "<range_name>"
    },
    "name": "modify_sheet_values"
  }
}

Input Schema

NameRequiredDescriptionDefault
chipsNoSmart chip(s) to insert instead of values: - A single URL or email string for a single cell (e.g., "https://drive.google.com/drive/folders/123", "user@example.com"). - A list of URLs or emails for a single cell (multiple chips) or across cells (e.g., ["https://...", "https://..."]). - A 2D list of URLs/emails matching a grid range. For a single-row or single-column range, each inner list is instead the chips for one cell (e.g., [["a@x.com", "b@x.com"]] puts both chips in the first cell of "A1:C1"). - A dict or list of dicts with explicit properties (e.g., {"type": "drive", "uri": "..."}, {"type": "person", "email": "..."}). - A JSON-encoded string representing any of the above formats.
valuesNo2D array of values to write/update. Can be a JSON string or Python list. Required unless clear_values=True or chips or source_range is provided.
chip_typeNoExplicit chip type if passing raw strings in chips: "drive" (default for URLs/IDs) or "person" (default for emails).
file_pathNoLocal .csv or .tsv file (UTF-8) whose rows are written instead of values, with value_input_option applied. range_name may be just the top-left cell (e.g., "Sheet1!A2" to load below a header row). Use instead of values, chips, source_range, or clear_values.
paste_typeNoWhat source_range pastes: "PASTE_NORMAL" (values, formulas, formatting), "PASTE_VALUES", "PASTE_FORMAT", "PASTE_NO_BORDERS", "PASTE_FORMULA", "PASTE_DATA_VALIDATION", or "PASTE_CONDITIONAL_FORMATTING". Defaults to "PASTE_NORMAL".PASTE_NORMAL
range_nameYesThe range to modify (e.g., "Sheet1!A1:D10", "A1:D10"). Required.
clear_valuesNoIf True, clears the range instead of writing values. Defaults to False.
source_rangeNoA1 range in the same spreadsheet to copy into range_name, like the UI copy and paste: relative formula references shift and formatting comes along. Both ranges must be A1 notation (not named ranges); one without a sheet name uses the first sheet. range_name may be just the top-left cell (e.g., copy "Sheet1!A29:AO29" to "Sheet1!A30"). Use instead of values, chips, or clear_values.
spreadsheet_idYesThe ID of the spreadsheet. Required.
user_google_emailYesThe user's Google email address. Required.
value_input_optionNoHow to interpret input values ("RAW" or "USER_ENTERED"). Defaults to "USER_ENTERED".USER_ENTERED

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.7.0
    • addedInput schema / properties / file_path
      Added value: +{
      +  "default": null,
      +  "description": "Local .csv or .tsv file (UTF-8) whose rows are written instead of values,\nwith value_input_option applied. range_name may be just the top-left cell (e.g., \"Sheet1!A2\"\nto load below a header row). Use instead of values, chips, source_range, or clear_values.",
      +  "type": "string"
      +}
    • changedInput schema / properties / values / description
      Previous value: -"2D array of values to write/update. Can be a JSON string or Python list. Required unless clear_values=True or chips is provided."New value: +"2D array of values to write/update. Can be a JSON string or Python list. Required unless clear_values=True or chips or source_range is provided."
  2. Changed2 schema fields changedv2.4.2
    • addedInput schema / properties / paste_type
      Added value: +{
      +  "default": "PASTE_NORMAL",
      +  "description": "What source_range pastes: \"PASTE_NORMAL\" (values, formulas, formatting), \"PASTE_VALUES\",\n\"PASTE_FORMAT\", \"PASTE_NO_BORDERS\", \"PASTE_FORMULA\", \"PASTE_DATA_VALIDATION\", or\n\"PASTE_CONDITIONAL_FORMATTING\". Defaults to \"PASTE_NORMAL\".",
      +  "type": "string"
      +}
    • addedInput schema / properties / source_range
      Added value: +{
      +  "default": null,
      +  "description": "A1 range in the same spreadsheet to copy into range_name, like the UI copy and\npaste: relative formula references shift and formatting comes along. Both ranges must be A1 notation (not\nnamed ranges); one without a sheet name uses the first sheet. range_name may be just the top-left cell\n(e.g., copy \"Sheet1!A29:AO29\" to \"Sheet1!A30\"). Use instead of values, chips, or clear_values.",
      +  "type": "string"
      +}
  3. Changed3 schema fields changedv1.30.1
    • addedInput schema / properties / chip_type
      Added value: +{
      +  "default": null,
      +  "description": "Explicit chip type if passing raw strings in chips: \"drive\" (default for URLs/IDs) or \"person\" (default for emails).",
      +  "type": "string"
      +}
    • addedInput schema / properties / chips
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "items": {},
      +      "type": "array"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Smart chip(s) to insert instead of values:\n- A single URL or email string for a single cell (e.g., \"https://drive.google.com/drive/folders/123\", \"user@example.com\").\n- A list of URLs or emails for a single cell (multiple chips) or across cells (e.g., [\"https://...\", \"https://...\"]).\n- A 2D list of URLs/emails matching a grid range. For a single-row or single-column\n  range, each inner list is instead the chips for one cell (e.g., [[\"a@x.com\", \"b@x.com\"]]\n  puts both chips in the first cell of \"A1:C1\").\n- A dict or list of dicts with explicit properties (e.g., {\"type\": \"drive\", \"uri\": \"...\"}, {\"type\": \"person\", \"email\": \"...\"}).\n- A JSON-encoded string representing any of the above formats."
      +}
    • changedInput schema / properties / values / description
      Previous value: -"2D array of values to write/update. Can be a JSON string or Python list. Required unless clear_values=True."New value: +"2D array of values to write/update. Can be a JSON string or Python list. Required unless clear_values=True or chips is provided."
  4. Changed1 schema field changedv1.28.0
    • changedInput schema / properties / values / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "items": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "type": "array"
      +  }
      +]
  5. Changed18 schema fields changedv1.0.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / clear_values / description
      Added value: +"If True, clears the range instead of writing values. Defaults to False."
    • removedInput schema / properties / clear_values / title
      Removed value: -"Clear Values"
    • addedInput schema / properties / range_name / description
      Added value: +"The range to modify (e.g., \"Sheet1!A1:D10\", \"A1:D10\"). Required."
    • removedInput schema / properties / range_name / title
      Removed value: -"Range Name"
    • removedInput schema / properties / service
      Removed value: -{
      -  "title": "service",
      -  "type": "string"
      -}
    • addedInput schema / properties / spreadsheet_id / description
      Added value: +"The ID of the spreadsheet. Required."
    • removedInput schema / properties / spreadsheet_id / title
      Removed value: -"Spreadsheet Id"
    • addedInput schema / properties / user_google_email / description
      Added value: +"The user's Google email address. Required."
    • removedInput schema / properties / user_google_email / title
      Removed value: -"User Google Email"
    • addedInput schema / properties / value_input_option / description
      Added value: +"How to interpret input values (\"RAW\" or \"USER_ENTERED\"). Defaults to \"USER_ENTERED\"."
    • removedInput schema / properties / value_input_option / title
      Removed value: -"Value Input Option"
    • changedInput schema / properties / values / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / values / description
      Added value: +"2D array of values to write/update. Can be a JSON string or Python list. Required unless clear_values=True."
    • removedInput schema / properties / values / title
      Removed value: -"Values"
    • changedInput schema / required
      Previous value: -[
      -  "service",
      -  "user_google_email",
      -  "spreadsheet_id",
      -  "range_name"
      -]New value: +[
      +  "user_google_email",
      +  "spreadsheet_id",
      +  "range_name"
      +]
    • removedInput schema / title
      Removed value: -"modify_sheet_valuesArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object",
      +  "x-fastmcp-wrap-result": true
      +}
  6. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, idempotentHint=false and openWorldHint=true, so the safety profile is known. The description adds useful context that one mode clears values and that copy-paste shifts relative formula references and carries formatting, but it never warns that writing overwrites existing cell contents or notes any quota/permission behavior.

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 the resource and range scope first, followed by the mode list; no filler or redundancy. It is lean to the point of omitting guidance an 11-parameter tool might warrant, but nothing in it is wasted.

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?

An output schema exists, so return values need not be described, and the schema fully documents the parameter space. The description covers all five operating modes at a level sufficient to choose the tool, with only the mode-selection and overwrite-warning gaps keeping it from being complete.

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 all 11 parameters, including the chip formats and paste_type options, are fully documented in the schema itself. The description only echoes the high-level modes and adds no format or syntax detail beyond what the schema already supplies, so the baseline of 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?

States a specific verb and resource ("Modifies values in a specific range of a Google Sheet") and enumerates the concrete modes: write, update, clear, insert Smart Chips, or copy another range. This clearly separates it from the read-side sibling read_sheet_values, though it never names an alternative or distinguishes itself from format_sheet_range, which also mutates a sheet.

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?

Usage is implied by the enumerated modes rather than stated: an agent can infer that clearing uses the clear mode and copying uses source_range, but there is no explicit when-to-use/when-not guidance. Nothing tells the agent when to prefer format_sheet_range or append_table_rows instead, and the mutual exclusivity of values/chips/source_range/clear_values is only explained in the schema.

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

Deploy Server

Other Tools