Skip to main content
Glama

get_table_data_tool

Retrieve table data from Google Sheets with optional column and row filtering. Specify spreadsheet, sheet, and table name to get targeted data.

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

TableJSON Schema
NameRequiredDescriptionDefault
spreadsheet_nameYesThe name of the Google Spreadsheet
sheet_nameYesThe name of the sheet containing the table
table_nameYesName of the table to read data from
column_namesNoList of column names to retrieve (optional - if not provided, gets all columns)
start_rowNoStarting row index (0-based, optional, use -1 for all rows)
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)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description must carry full burden. It discloses internal API selection but does not mention behavioral aspects like mutation safety (it is read-only), error handling, rate limits, or what happens if the table does not exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is moderately concise but includes implementation details (internal API choice) that could be omitted. It front-loads the main purpose but then expands with parameter list and logic, making it slightly verbose.

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?

With 8 parameters and an output schema, the description explains the two distinct retrieval methods, optional parameters, and return format. It is missing some error behavior details but is otherwise complete given the output schema exists.

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 coverage is 100% with each parameter described. The description adds marginal clarification (e.g., -1 for all rows, include_headers), but the baseline of 3 is appropriate as the schema already provides sufficient detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves table data with optional column filtering via Google Sheets API. It distinguishes from sibling read tools like get_sheet_cells_by_notation/rang and get_table_metadata_tool by focusing on table-level data retrieval.

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?

The description explains when to use which internal method (with/without column_names) but does not explicitly guide when to choose this tool over siblings like get_sheet_cells_by_range_tool or discover_spreadsheets_tool. Usage context is implied but lacks alternative exclusions.

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

Install Server

Other Tools

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

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