Skip to main content
Glama

list_tables

List every table in a Google Docs tab with its index, size, location, heading, and merged-cell info. The returned table_index enables direct access via get_table or replace_table_row.

Instructions

List every top-level table in a document tab.

Use this tool to discover and address the tables in a tab before calling get_table or replace_table_row — both require a table_index, which this tool assigns in document order.

Returns tables: a list of table_index, rows, columns, start_index, end_index, preceding_heading (the nearest heading above the table, or null if none), first_row, and has_merged_cells — plus doc_id, tab_id, and revision_id.

Errors: TAB_NOT_FOUND – tab_id not in document AUTH_EXPIRED – no valid token

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
tab_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and meets it: it discloses scope (top-level tables only), ordering semantics (document order), the exact return shape including the null-if-none preceding_heading behavior, and both error codes, AUTH_EXPIRED and TAB_NOT_FOUND. No contradiction with annotations because none exist.

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

Conciseness4/5

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

Well-structured and front-loaded: one-sentence purpose, then usage guidance, return shape, and a labeled Errors section. The only waste is that the detailed return-value enumeration largely duplicates what the output schema already provides, so it could be trimmed without losing information.

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?

For a 2-parameter tool with an output schema, this is nearly complete: errors are documented, scope and ordering are explained, and the sibling relationship is established. The remaining gap is that with no annotations the read-only safety is only implied by the verb 'List,' and the source of doc_id/tab_id is left for the agent to infer from list_tabs.

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 0% and the schema exposes only bare string types, so the description must compensate. It adds modest meaning: the TAB_NOT_FOUND error clarifies that tab_id must belong to the document, and the usage line explains the link to table_index. However, it never explains how to obtain doc_id/tab_id (e.g., via list_tabs) or gives value constraints, so the compensation is partial.

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 first sentence states a specific verb ('List') and resource ('every top-level table in a document tab'), and the usage line differentiates it from siblings — get_table and replace_table_row both require the table_index this tool assigns. An agent can distinguish this from list_tabs and insert_table without inspecting their schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs to use this tool before get_table or replace_table_row and explains why: both require a table_index that this tool assigns in document order. This is clear, actionable routing among siblings with no inference needed.

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