Skip to main content
Glama
tom275275

Google Workspace MCP Server

by tom275275

debug_table_structure

Inspect Docs table structure to diagnose misaligned data, missing tables, or concatenated cells. Get exact dimensions, cell positions, content, and insertion indices to fix table population.

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 use populate_existing_table

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

Args: user_google_email: User's Google email address document_id: ID of the document to inspect table_index: Which table to debug (0 = first table, 1 = second table, etc.)

Returns: str: Detailed JSON structure showing table layout, cell positions, and current content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYes
table_indexNo
user_google_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.14.3

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it largely succeeds: it frames the tool as showing/inspecting ('WHAT THIS SHOWS YOU', 'shows', 'returns') rather than mutating, and it explains the exact return payload semantics. However, it never explicitly asserts that the tool makes no changes to the document, and it doesn't describe edge-case behavior such as what happens when table_index is out of range. That keeps it a 4 rather than a 5.

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?

The description is well-structured with header-labeled sections, bullets, and the most urgent message front-loaded. All-caps emphasis makes the debug purpose unmissable. It is, however, verbose and contains minor redundancy — the 'ESSENTIAL DEBUGING TOOL' opener partially overlaps with the trigger list, and the workflow section partly restates the debugging scenarios. Dense with value, but not maximally efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-table inspection tool, the description is exhaustive: trigger conditions, output field semantics, parameter glossary, return type, and workflow placement are all covered. Since an output schema exists, the description needn't spell out every return field, and the ones it does explain (dimensions, position, current_content, insertion_index) are precisely the ones an agent needs to interpret results. Nothing needed for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate — and it does fully. The Args section explains user_google_email as the user's email address, document_id as the target document, and table_index with concrete indexing semantics ('0 = first table, 1 = second table, etc.'). The workflow section further clarifies that these parameters select a table to debug, adding meaning far beyond the bare type declarations in the schema.

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 opens by identifying the tool as an essential debugging tool for tables that don't work as expected, then lists concrete outputs: exact dimensions, cell coordinates, current contents, insertion indices, and boundaries. This is a specific verb (debug/inspect) applied to a specific resource (Google Docs table structure). The table-only scope inherently distinguishes it from siblings like inspect_doc_structure or get_doc_content, even though no sibling is named.

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?

The 'USE THIS IMMEDIATELY WHEN' section enumerates five explicit trigger conditions (wrong-cell population, 'table not found' errors, concatenated data, needing structure, planning to populate a table), and the 'WORKFLOW INTEGRATION' section maps the tool into four workflow stages (verify, plan, diagnose, debug). This is unusually explicit when-to-use guidance. It does not name alternatives, but the exclusive trigger list implicitly defines when not to use it.

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