Skip to main content
Glama

google-sheets-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GOOGLE_PROJECT_IDYesYour Google Cloud project ID (e.g., 'my-sheets-automation-123456')
GOOGLE_PRIVATE_KEYYesThe private key from your Google service account JSON file (starting with '-----BEGIN PRIVATE KEY-----')
GOOGLE_CLIENT_EMAILYesThe client email from your Google service account JSON file (e.g., 'your-service@your-project.iam.gserviceaccount.com')

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
discover_spreadsheets_tool
Discover spreadsheets and their sheet names. Args: max_spreadsheets: Maximum number of spreadsheets to analyze (default: 10) Returns: JSON string containing spreadsheet names and their sheet names
update_spreadsheet_title_tool
Update a Google Spreadsheet title.
create_sheets_tool
Create new sheets in a Google Spreadsheet.
delete_sheets_tool
Delete sheets from a Google Spreadsheet.
create_duplicate_sheet_tool
Create a duplicate of an existing sheet.
update_sheet_titles_tool
Update sheet titles in a Google Spreadsheet.
analyze_sheet_structure_tool
Analyze a specific sheet's structure - quick overview. This tool provides a simple overview of what's in the sheet: - Sheet basic info (name, size, hidden status) - Tables (count, names, ranges, sizes) - Charts (count, IDs, positions) - Slicers (count, IDs, positions) - Drawings (count, IDs, positions) - Developer metadata (count, keys, values) - Summary (total elements, sheet type, frozen panes) Args: spreadsheet_name: The name of the Google Spreadsheet sheet_name: Name of the specific sheet to analyze Returns: JSON string with simplified structure overview
create_table_tool
Create a new table in Google Sheets. This tool creates a structured table with specified columns and data types. Tables provide better data organization, validation, and formatting capabilities. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet to create table in table_name: Name for the table start_cell: Starting cell for the table (e.g., "A1") column_names: List of column names column_types: List of column types corresponding to column_names dropdown_columns: List of column names that should have dropdown validation dropdown_values: List of comma-separated dropdown options for each dropdown column Returns: JSON string with success status and table details
delete_table_tool
Delete tables from Google Sheets. This tool removes specified tables from a sheet while preserving other content. The table structure and data will be permanently deleted. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the tables table_names: List of table names to delete Returns: JSON string with success status and deletion details
update_table_title_tool
Update a table title in Google Sheets. This tool allows you to update the title of an existing table. The table structure and data remain unchanged. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the table old_table_name: Current name of the table to update new_table_name: New title for the table Returns: JSON string with success status and update details
get_table_metadata_tool
Get comprehensive metadata for tables in Google Sheets. This tool provides detailed information about table structure, columns, data types, formatting, statistics, and other properties. If no table name is provided, returns metadata for all tables. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the table table_name: Name of the table to get metadata for (optional) include_sample_data: Whether to include sample data rows include_formulas: Whether to include formula information include_formatting: Whether to include cell formatting details include_statistics: Whether to include data statistics max_sample_rows: Maximum number of sample rows to return specific_columns: List of column names to get metadata for (optional) exclude_metadata_types: List of metadata types to exclude Returns: JSON string containing table metadata or list of all tables
add_table_column_tool
Add new columns to an existing table in Google Sheets. This tool extends an existing table with additional columns. New columns can have different data types and validation rules. Supports adding multiple columns at once with proper positioning. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the table table_name: Name of the table to add columns to column_names: List of column names to add column_types: List of column types corresponding to column_names positions: List of positions to insert columns (0-based index, empty list for end) dropdown_columns: List of column names that should have dropdown validation dropdown_values: List of comma-separated dropdown options for each dropdown column Returns: JSON string with success status and column addition details
update_table_sorting_tool
Update table sorting by a specific column. This tool sorts all data rows in a table based on a specified column. The header row remains in place, and data rows are reordered. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the table table_name: Name of the table to sort column_name: Name of the column to sort by sort_order: Sort order - "ASC" or "DESC" (default: "ASC") Returns: JSON string with success status and sorting details
delete_table_records_tool
Delete specific records (rows) from a table. This tool removes specific records from a table while preserving the table structure. Record numbers are 1-based and exclude the header row. Records are deleted in descending order (bigger numbers first) to avoid index shifting issues. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the table table_name: Name of the table to delete records from record_numbers: List of record numbers to delete (1-based, excluding header) Returns: JSON string with success status and deletion details
update_table_cells_by_notation_tool
Update specific cells in a table. This tool updates multiple cells in a table with new values using A1 notation. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the table table_name: Name of the table to update cell_updates: List of cell updates with cell_notation and value Returns: JSON string with success status and update details
get_sheet_cells_by_notation_tool
Get values from specific cells in a sheet. This tool retrieves values from multiple cells in a sheet using A1 notation. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet to get cells from cell_notations: List of cell notations to get values from (e.g., ['A1', 'A6', 'A10', 'E5']) Returns: JSON string with cell values and mapping
update_table_column_name_tool
Update column names in a table. This tool updates existing column names in a table by their index. The number of column indices must match the number of new column names. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the table table_name: Name of the table to update column names in column_indices: List of column indices to update (0-based) new_column_names: List of new column names Returns: JSON string with success status and update details
update_table_column_type_tool
Update column types in a table. This tool updates the data type of existing columns in a table. The number of column names must match the number of new column types. Available column types: - DOUBLE: Numeric data with decimals - CURRENCY: Monetary values ($#,##0.00) - PERCENT: Percentage values (0.00%) - DATE: Date values (yyyy-mm-dd) - TIME: Time values (hh:mm:ss) - DATE_TIME: Date and time values - TEXT: Plain text data - BOOLEAN: True/false values - DROPDOWN: Selection from predefined options Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the table table_name: Name of the table to update column types in column_names: List of column names to update types for new_column_types: List of new column types Returns: JSON string with success status and type update details
get_table_data_tool
Get table data with optional column filtering using Google Sheets API. This unified tool can retrieve all table data or specific columns based on user input. If column_names is provided, it uses spreadsheets.values.get for efficiency. If column_names is not provided, it uses spreadsheets.tables.get for full data. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the table table_name: Name of the table to read data from column_names: List of column names to retrieve (optional - if not provided, gets all columns) start_row: Starting row index (0-based, optional) end_row: Ending row index (0-based, optional) include_headers: Whether to include header row in results max_rows: Maximum number of rows to return (optional) Returns: JSON string with table data and metadata
update_dropdown_options_tool
Update dropdown options in a table column. This tool can add or remove specific dropdown options from an existing column in a table. For 'add' action: Adds new options to existing dropdown (preserves existing options). For 'remove' action: Removes specific options from existing dropdown. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the table table_name: Name of the table to update dropdown options in action: Action to perform - "add" or "remove" column_name: Name of the column to update dropdown options for dropdown_options: List of dropdown options to add/remove Returns: JSON string with success status and dropdown update details
delete_table_column_tool
Delete specific columns from a table in Google Sheets. This tool removes the specified columns from the table and updates the table structure accordingly. The remaining columns will be shifted left to fill the gaps. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the table table_name: Name of the table to delete columns from column_names: List of column names to delete Returns: JSON string with operation results
add_table_records_tool
Add records (rows) into a table in Google Sheets at the end. This tool adds new records into a table at the end using InsertRangeRequest, UpdateCellsRequest, and UpdateTableRequest operations. Each record must match the table's column structure. Records are automatically formatted according to column types. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the table table_name: Name of the table to add records into records: List of records, where each record is a list of values matching table columns Returns: JSON string with success status and operation details
get_sheet_cells_by_range_tool
Get sheet cells by range. This tool retrieves cell data from a specific range within a sheet. You can specify the exact cell range using A1 notation. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet to get cells from start_cell: Starting cell reference (e.g., 'A1', 'B2') end_cell: Ending cell reference (e.g., 'C5', 'D10') include_headers: Whether to include header row Returns: JSON string with cells data and metadata
update_table_cells_by_range_tool
Update table cells by range. This tool updates cell data in a specific range within a table. You can specify the exact cell range using A1 notation. Args: spreadsheet_name: Name of the spreadsheet sheet_name: Name of the sheet containing the table table_name: Name of the table to update start_cell: Starting cell reference (e.g., 'A1', 'B2') end_cell: Ending cell reference (e.g., 'C5', 'D10') cell_values: 2D array of values to update (rows x columns) Returns: JSON string with update details

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/henilcalagiya/google-sheets-mcp'

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