Skip to main content
Glama
marekrost

mcp-server-spreadsheet

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

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
list_workbooksA

List all spreadsheet files (.xlsx, .csv, .ods) in a directory (non-recursive).

Returns the full path of each file found, sorted alphabetically.

create_workbook_fileA

Create a new empty spreadsheet file at the given path.

The file format is determined by the extension (.xlsx, .csv, or .ods). The file must not already exist. Returns the absolute path of the created file.

copy_workbookA

Copy an existing spreadsheet file to a new location.

Performs a full file copy preserving all data. The destination must not already exist. Returns the absolute path of the new file.

list_sheetsA

List all sheet names in a workbook, in workbook order.

Returns a list of sheet name strings. CSV files always return a single sheet named 'default'.

add_sheetA

Add a new sheet to the workbook.

Returns the name of the newly created sheet. Not supported for CSV files.

rename_sheetB

Rename an existing sheet in the workbook.

Returns the new sheet name on success.

delete_sheetA

Delete a sheet by name from the workbook.

All data in the sheet is permanently removed. Not supported for CSV files.

copy_sheetA

Duplicate a sheet within the same workbook.

Copies all cell values. Returns the name of the new sheet. Not supported for CSV files.

read_sheetA

Read an entire sheet (or a bounded sub-region) as a list of rows.

Each row is a list of cell values. Empty cells appear as null. Use the optional row/column bounds to limit output for large sheets.

read_cellA

Read the value of a single cell.

Returns the cell's value: numbers as int/float, text as string, and empty cells as null.

read_rangeA

Read a rectangular range of cells as a list of rows.

Returns a 2D array where each inner list is one row of values. Empty cells return null.

get_sheet_dimensionsA

Get the dimensions of the used range in a sheet.

Returns {"rows": N, "columns": M} where N is the number of the last used row and M is the number of the last used column. Both are 0 for an empty sheet.

write_cellA

Write a single value to a cell.

Overwrites any existing value. The value is type-coerced: numeric strings become numbers, all else is text.

write_rangeA

Write a 2D array of values into a rectangular region.

Writing starts at start_cell and expands right and down to fit the data. Prefer this over multiple write_cell calls for efficiency.

append_rowsA

Append one or more rows after the last used row in the sheet.

Values are type-coerced (numeric strings to numbers). This is the most efficient way to add data to the end of a sheet.

insert_rowsA

Insert rows at a given position, shifting existing rows down.

If data is provided, the inserted rows are filled with those values (type-coerced). Otherwise the rows are left blank.

delete_rowsB

Delete one or more rows, shifting remaining rows up.

All data in the deleted rows is permanently removed.

clear_rangeA

Clear all cell values in a range without removing rows or columns.

Sets every cell in the range to null. Row/column structure is preserved.

copy_rangeA

Copy a rectangular block of cells to another location.

Copies raw values only. The destination can be on the same sheet or a different sheet in the same workbook. Existing values at the destination are overwritten.

insert_columnsB

Insert one or more blank columns, shifting existing columns right.

delete_columnsB

Delete one or more columns, shifting remaining columns left.

search_sheetA

Search all cells in a sheet for values matching a regex pattern.

Returns a list of matches, each with the cell reference and value, e.g. [{"cell": "B3", "value": "hello"}, ...]. Returns an empty list if no matches are found.

describe_tableA

Inspect the structure of a sheet treated as a database table.

Returns column names, inferred data types (text, integer, number, boolean, date), total row count, and sample values from the first 3 data rows. Use this before writing SQL queries to understand the available columns and their types.

When sheet is omitted, returns a list of descriptions for all sheets.

sql_queryA

Execute a read-only SQL SELECT query against the spreadsheet data.

Every sheet in the workbook is loaded as a database table, with the header row defining column names and data rows below it. Returns results as a list of {column: value} objects.

Only SELECT (and WITH ... SELECT) statements are accepted. Use sql_execute for INSERT, UPDATE, or DELETE.

sql_executeA

Execute a mutating SQL statement and write changes back to the file.

Supports INSERT INTO (adds rows), UPDATE (modifies cell values), and DELETE FROM (removes rows). The target sheet is determined from the SQL statement. After execution, the modified table is written back to the file atomically. Returns {"affected_rows": N}.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

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

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