inspect_doc_structure
Analyze document structure to identify safe insertion points, locate existing tables, and retrieve statistics. Use this tool to ensure correct table placement and understand layout before making changes in Google Docs.
Instructions
Essential tool for finding safe insertion points and understanding document structure.
USE THIS FOR:
Finding the correct index for table insertion
Understanding document layout before making changes
Locating existing tables and their positions
Getting document statistics and complexity info
CRITICAL FOR TABLE OPERATIONS: ALWAYS call this BEFORE creating tables to get a safe insertion index.
WHAT THE OUTPUT SHOWS:
total_elements: Number of document elements
total_length: Maximum safe index for insertion
tables: Number of existing tables
table_details: Position and dimensions of each table
WORKFLOW: Step 1: Call this function Step 2: Note the "total_length" value Step 3: Use an index < total_length for table insertion Step 4: Create your table
Args: user_google_email: User's Google email address document_id: ID of the document to inspect detailed: Whether to return detailed structure information
Returns: str: JSON string containing document structure and safe insertion indices
Input Schema
Name | Required | Description | Default |
---|---|---|---|
detailed | No | ||
document_id | Yes | ||
user_google_email | Yes |