Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GOOGLE_SHEETS_TOKENNoPath to cached user token<home>/token.json
GOOGLE_SHEETS_MCP_HOMENoConfig directory for google-sheets-mcp~/.config/google-sheets-mcp
GOOGLE_SHEETS_CREDENTIALSNoPath to OAuth client secret JSON file<home>/credentials.json

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_spreadsheet_infoA

Get a spreadsheet's title, URL, and the list of its sheets.

Returns each sheet's title, numeric sheetId, index, dimensions, and any frozen rows/columns. Use this first to discover sheet names and sizes.

create_spreadsheetA

Create a new spreadsheet and return its id and URL.

Optionally provide sheet_titles to seed multiple named sheets/tabs.

add_sheetC

Add a new sheet/tab to an existing spreadsheet.

rename_sheetC

Rename a sheet/tab.

delete_sheetB

Delete a sheet/tab by name or numeric sheetId.

duplicate_sheetB

Duplicate a sheet/tab, optionally setting the new title and index.

batch_update_advancedA

Run allowlisted raw Sheets API batchUpdate requests.

Each request must contain exactly one allowed request kind. Data-source lifecycle requests are blocked, and a call may contain at most 50 requests. Prefer the typed tools when one exists; use this for advanced API coverage.

read_rangeA

Read cell values from an A1 range (e.g. Sheet1!A1:C10).

value_render_option: FORMATTED_VALUE (as shown, default), UNFORMATTED_VALUE (typed values), or FORMULA (underlying formulas). Returns {"range", "values"} where values is a list of rows.

batch_readC

Read several A1 ranges at once. Returns {"valueRanges": [...]}.

write_rangeB

Write a 2D array of values to an A1 range.

value_input_option: RAW (store verbatim as strings; default) or USER_ENTERED (parse like a user typing — formulas, dates, and numbers are evaluated). Opt in to USER_ENTERED explicitly; it evaluates formulas including those that can make external network requests.

append_rowsC

Append rows after the last row of data within/near the given A1 range.

The range selects the table to append to (e.g. Sheet1!A1 or Sheet1!A:D); new rows are added below the existing data.

value_input_option: RAW (verbatim strings; default) or USER_ENTERED (evaluate formulas/dates/numbers — opt in explicitly).

clear_rangeA

Clear the values in an A1 range (formatting is preserved).

batch_writeA

Write values to multiple ranges in one values batchUpdate call.

data items use the Sheets API ValueRange shape, e.g. {"range": "Sheet1!A1:B2", "values": [[1, 2], [3, 4]]}.

batch_clearC

Clear values from multiple A1 ranges in one call.

format_cellsA

Apply cell formatting to an A1 range. Only the arguments you pass change.

  • text_color / background_color: "#RRGGBB", a named color (red, blue, lightgray, ...), or omit to leave unchanged.

  • horizontal_alignment: LEFT | CENTER | RIGHT.

  • vertical_alignment: TOP | MIDDLE | BOTTOM.

  • wrap_strategy: OVERFLOW_CELL | CLIP | WRAP.

  • number_format_type: TEXT | NUMBER | PERCENT | CURRENCY | DATE | TIME | DATE_TIME | SCIENTIFIC; pair with an optional number_format_pattern (e.g. "$#,##0.00", "0.0%").

set_bordersA

Set borders on an A1 range.

style: SOLID | SOLID_MEDIUM | SOLID_THICK | DASHED | DOTTED | DOUBLE | NONE (use NONE to clear). top/bottom/ left/right are the outer edges; inner_* set borders between cells.

merge_cellsC

Merge cells in an A1 range.

merge_type: MERGE_ALL (one cell), MERGE_COLUMNS (merge each column vertically), or MERGE_ROWS (merge each row horizontally).

unmerge_cellsB

Unmerge any merged cells overlapping an A1 range.

set_dimension_sizeB

Set a fixed pixel size for a band of columns or rows.

dimension: COLUMNS or ROWS. Indices are zero-based and half-open (start_index=0, end_index=3 covers the first three columns/rows).

auto_resize_dimensionsC

Auto-fit columns or rows to their contents (zero-based, half-open range).

freezeA

Freeze the first rows rows and/or columns columns of a sheet.

Pass 0 to unfreeze. Leaving an argument as None keeps it unchanged.

insert_rowsC

Insert rows before start_index; indices are zero-based and half-open.

delete_rowsB

Delete rows; indices are zero-based and half-open.

insert_columnsC

Insert columns before start_index; indices are zero-based and half-open.

delete_columnsC

Delete columns; indices are zero-based and half-open.

append_rows_to_sheetC

Append empty rows to the end of a sheet.

append_columns_to_sheetC

Append empty columns to the end of a sheet.

move_rows_or_columnsC

Move rows or columns to destination_index; indices are zero-based.

insert_rangeC

Insert cells in an A1 range, shifting existing cells by ROWS or COLUMNS.

delete_rangeA

Delete cells in an A1 range, shifting remaining cells by ROWS or COLUMNS.

copy_rangeC

Copy a range to another range.

cut_paste_rangeA

Cut a range and paste it starting at a destination cell.

paste_delimited_dataC

Paste delimited text/HTML starting at a single cell.

sort_rangeC

Sort a range using Sheets API SortSpec objects.

find_replaceB

Find and replace text in one range or all sheets.

trim_whitespaceC

Trim leading/trailing/repeated whitespace in each cell in an A1 range.

delete_duplicatesB

Remove duplicate rows from a range, optionally comparing only column indexes.

text_to_columnsC

Split a single-column range into multiple columns.

auto_fillC

Autofill within an A1 range by detecting existing source data.

randomize_rangeC

Randomize row order inside an A1 range.

set_basic_filterC

Set the sheet's basic filter over an A1 range.

clear_basic_filterC

Clear the basic filter on a sheet.

add_filter_viewC

Add a filter view over an A1 range.

update_filter_viewC

Update a filter view using a Sheets API FilterView object.

delete_filter_viewC

Delete a filter view by ID.

set_data_validationC

Set a data validation rule on an A1 range.

clear_data_validationB

Clear data validation from an A1 range.

add_named_rangeC

Create a named range over an A1 range.

update_named_rangeC

Update a named range's name and/or range.

delete_named_rangeC

Delete a named range by ID.

add_protected_rangeB

Protect an A1 range; defaults to warning-only protection.

update_protected_rangeC

Update a protected range using a Sheets API ProtectedRange object.

delete_protected_rangeC

Delete a protected range by ID.

add_bandingC

Add alternating-color banding to an A1 range.

update_bandingC

Update banding using a Sheets API BandedRange object.

delete_bandingB

Delete banding by ID.

add_dimension_groupC

Group rows or columns over a zero-based, half-open range.

update_dimension_groupC

Collapse or expand a row/column group.

delete_dimension_groupC

Delete a row/column group.

add_tableC

Add a Sheets table over an A1 range.

update_tableD

Update a table using a Sheets API Table object.

delete_tableC

Delete a table by ID.

create_chartA

Create an embedded chart from existing sheet data.

chart_type: COLUMN, BAR, LINE, AREA, SCATTER, COMBO, STEPPED_AREA, PIE, or DONUT.

domain_range is the category/label range; series_ranges is one or more value ranges. Each source must be a single row or single column, e.g. Sheet1!A2:A10 plus Sheet1!B2:B10. Ranges without a sheet prefix use sheet. anchor_cell is where the chart is overlaid on that sheet.

create_chart_from_specA

Create an embedded chart from a full Sheets API ChartSpec object.

Use this for histogram, scorecard, bubble, candlestick, waterfall, treemap, org, or other chart specs not covered by create_chart.

update_chartB

Replace a chart's spec. Use move_chart to move or resize it.

delete_chartC

Delete a chart or other embedded object by ID.

move_chartC

Move and/or resize a chart using overlay positioning.

set_chart_borderC

Set an embedded object's border color.

create_pivot_tableC

Create a pivot table at a destination cell.

rows, columns, values, and filter_specs use the Sheets API PivotGroup/PivotValue/PivotFilterSpec shapes.

add_slicerC

Add a slicer for a data range.

update_slicerC

Update a slicer spec by ID.

delete_slicerC

Delete a slicer by embedded object ID.

add_conditional_formatC

Add a boolean conditional-format rule to an A1 range.

condition_type is a Sheets ConditionType such as NUMBER_GREATER, NUMBER_LESS, NUMBER_BETWEEN, TEXT_CONTAINS, TEXT_EQ, CUSTOM_FORMULA, BLANK, NOT_BLANK. values supplies the comparison operands (e.g. ["100"] or ["10","20"]; for CUSTOM_FORMULA a single ["=$A1>5"]). The format applies when the condition is true.

update_conditional_formatC

Replace a conditional-format rule at index.

delete_conditional_formatB

Delete a conditional-format rule by sheet and index.

describe_spreadsheetA

Compact, model-friendly snapshot of a spreadsheet in one call.

Accepts a spreadsheet ID or a full Google Sheets URL. Returns, per sheet: dimensions, frozen rows/cols, column headers with inferred types (number/date-ish/boolean/text/formula), a few sample rows, and any tables/charts. Use this first to ground natural requests like "the Revenue column" before calling other tools.

build_tableC

Write a titled table and format it in one shot.

anchor is where the top-left header goes: Sheet1!A1, a bare cell (first sheet), or a sheet name (its A1). Applies a style preset (clean/financial/report-header/input) to the header, optionally freezes the header row, adds banding, auto-fits columns, and applies per-column number_formats ({"Revenue": "currency"}). Set preview=True to get the planned ranges/requests without changing anything.

apply_style_presetA

Apply a named style preset to a range.

Presets: clean (bold shaded header + underline), financial (currency, right-aligned body + bold header), report-header (merged centered title), input (highlighted bordered input cells). range accepts A1 or natural refs like "whole sheet".

highlight_whereA

Conditionally highlight cells from a natural predicate.

condition examples: "> 100", "between 10 and 20", "contains overdue", "blank", "duplicates", "top 10%". Applies the given background color (default light amber), and/or text_color/bold. range accepts A1 or natural refs.

format_numbersC

Apply a number format to a range.

kind: currency | percent | date | datetime | thousands | number | plain. range accepts A1 or natural refs (e.g. a header name resolves to its whole column).

add_totals_rowA

Append a bold totals row beneath a table.

By default sums every column except the first (which gets a "Total" label). Override per column with functions keyed by header name, e.g. {"Margin": "AVERAGE", "Count": "COUNT"}.

autofitA

Auto-fit column widths to their contents.

target may be a sheet name (fits all columns) or an A1 range like Sheet1!A:D (fits just those columns).

sort_byB

Sort a range by a column identified by its header name (or letter).

order is asc or desc. Assumes the first row of range is a header (its cells are not sorted into the body).

Prompts

Interactive templates invoked by user choice

NameDescription
format_as_reportTurn a sheet into a clean, presentable report.
clean_sheetTidy up a messy sheet.
build_dashboardBuild a small dashboard from a data range.
analyzeAnalyze a sheet and surface insights.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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

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