Skip to main content
Glama

google-sheets-mcp

get_table_data_tool

Retrieve table data from Google Sheets with optional column filtering and row limits. Specify columns to extract specific data efficiently or fetch all columns for complete table information.

Instructions

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

Input Schema

NameRequiredDescriptionDefault
column_namesNoList of column names to retrieve (optional - if not provided, gets all columns)
end_rowNoEnding row index (0-based, optional, use -1 for all rows)
include_headersNoWhether to include header row in results
max_rowsNoMaximum number of rows to return (optional, use -1 for no limit)
sheet_nameYesThe name of the sheet containing the table
spreadsheet_nameYesThe name of the Google Spreadsheet
start_rowNoStarting row index (0-based, optional, use -1 for all rows)
table_nameYesName of the table to read data from

Input Schema (JSON Schema)

{ "properties": { "column_names": { "default": [], "description": "List of column names to retrieve (optional - if not provided, gets all columns)", "items": { "type": "string" }, "title": "Column Names", "type": "array" }, "end_row": { "default": -1, "description": "Ending row index (0-based, optional, use -1 for all rows)", "title": "End Row", "type": "integer" }, "include_headers": { "default": true, "description": "Whether to include header row in results", "title": "Include Headers", "type": "boolean" }, "max_rows": { "default": -1, "description": "Maximum number of rows to return (optional, use -1 for no limit)", "title": "Max Rows", "type": "integer" }, "sheet_name": { "description": "The name of the sheet containing the table", "title": "Sheet Name", "type": "string" }, "spreadsheet_name": { "description": "The name of the Google Spreadsheet", "title": "Spreadsheet Name", "type": "string" }, "start_row": { "default": -1, "description": "Starting row index (0-based, optional, use -1 for all rows)", "title": "Start Row", "type": "integer" }, "table_name": { "description": "Name of the table to read data from", "title": "Table Name", "type": "string" } }, "required": [ "spreadsheet_name", "sheet_name", "table_name" ], "title": "get_table_data_toolArguments", "type": "object" }

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