Skip to main content
Glama
taylorwilsdon

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Debug Table Structure

debug_table_structure
Read-onlyIdempotent

Inspect Google Docs table dimensions, cell coordinates, current content, and insertion indices to diagnose misaligned data, "table not found" errors, or concatenated cell text before filling cells.

Instructions

ESSENTIAL DEBUGGING TOOL - Use this whenever tables don't work as expected.

USE THIS IMMEDIATELY WHEN:

  • Table population put data in wrong cells

  • You get "table not found" errors

  • Data appears concatenated in first cell

  • Need to understand existing table structure

  • Planning to fill existing cells with modify_doc_text at their insertion_index

WHAT THIS SHOWS YOU:

  • Exact table dimensions (rows × columns)

  • Each cell's position coordinates (row,col)

  • Current content in each cell

  • Insertion indices for each cell

  • Table boundaries and ranges

HOW TO READ THE OUTPUT:

  • "dimensions": "2x3" = 2 rows, 3 columns

  • "position": "(0,0)" = first row, first column

  • "current_content": What's actually in each cell right now

  • "insertion_index": Where new text would be inserted in that cell

WORKFLOW INTEGRATION:

  1. After creating table → Use this to verify structure

  2. Before populating → Use this to plan your data format

  3. After population fails → Use this to see what went wrong

  4. When debugging → Compare your data array to actual table structure

Input Schema

NameRequiredDescriptionDefault
tab_idNoOptional ID of the tab containing the table (from inspect_doc_structure). If not provided, inspects the first tab.
document_idYesID of the document to inspect
table_indexNoWhich table to debug (0 = first table, 1 = second table, etc.)
user_google_emailYesUser's Google email address

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.2.0
    • addedInput schema / properties / tab_id
      Added value: +{
      +  "default": null,
      +  "description": "Optional ID of the tab containing the table (from inspect_doc_structure).\nIf not provided, inspects the first tab.",
      +  "type": "string"
      +}
  2. Addedv1.0.1

TDQS

A4/5.0
Behavior4/5

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

The annotations already establish that this is a read-only, idempotent, non-destructive inspection tool, so the description does not need to restate safety. The description adds useful behavioral detail by explaining exactly what the output reveals, including dimensions, cell coordinates, current content, insertion indices, and table boundaries.

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 front-loaded and organized into clear sections, but it is substantially longer than needed for a simple read-only debug tool. The all-caps emphasis and overlapping sections such as 'USE THIS IMMEDIATELY WHEN' and 'WORKFLOW INTEGRATION' add repetition without much additional useful guidance.

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?

Given the output schema and annotations, the description is complete enough to call the tool correctly and interpret its results. The main remaining gap is that it does not explicitly compare itself with inspect_doc_structure or clarify table_index behavior for documents with multiple tables.

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 description coverage is 100%, so the parameter meanings are already fully documented. The description does not add parameter-level guidance such as how table_index interacts with multiple tables or when tab_id is required; it only contextualizes insertion_index as an output concept.

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 uses a specific verb and resource: debug table structure, and repeatedly scopes it to inspecting table dimensions, cell positions, content, and insertion indices. This clearly distinguishes it from broader sibling tools like inspect_doc_structure and from related mutation tools like modify_doc_text.

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

Usage Guidelines4/5

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

It provides explicit triggering conditions, such as when table population puts data in wrong cells or when a 'table not found' error occurs, plus a workflow for verification before and after population. It does not explicitly state when not to use it or name a better alternative for overlapping structure inspection.

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

Deploy Server

Other Tools