Skip to main content
Glama
redesignhealth

Google Workspace MCP Server

inspect_doc_structure

Find safe insertion points for tables by inspecting Google Docs structure, locating existing tables, and understanding document layout.

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

TableJSON Schema
NameRequiredDescriptionDefault
detailedNo
document_idYes
user_google_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It explains what the output contains (total_elements, total_length, tables, table_details) and positions it as a safe inspection step, implying no side effects. It doesn't explicitly state read-only or potential errors, but the behavior is well disclosed for the tool's purpose.

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 clear sections (USE THIS FOR, CRITICAL, OUTPUT, WORKFLOW, Args, Returns). It is slightly verbose with repetition between the 'CRITICAL' section and the workflow, but the organization earns its place. No unnecessary fluff.

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?

The description provides a complete workflow, output explanation, and parameter list, making it self-sufficient for the agent to use correctly. It doesn't cover edge cases or detailed interpretation of 'detailed', but it adequately explains the critical aspects of safe insertion indices.

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

Parameters4/5

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

Schema description coverage is 0%, so the description compensates by listing all three parameters and their purposes. The 'detailed' parameter is only vaguely described as 'Whether to return detailed structure information', but the output section helps infer its impact. Overall, it adds enough meaning beyond the raw 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 clearly states the tool's purpose: 'inspect_doc_structure' is for finding safe insertion points and understanding document structure. It distinguishes from siblings by explicitly linking to table operations (e.g., 'CRITICAL FOR TABLE OPERATIONS'), making it clear this is not just a generic document reader.

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?

The description provides explicit use cases under 'USE THIS FOR' and a numbered workflow, emphasizing to call it before creating tables. It lacks explicit mention of alternatives or when not to use it, but the context is strong enough to guide an agent.

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/redesignhealth/google-mcp-unofficial'

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