Skip to main content
Glama

Read Google Doc

get_document
Read-only

Read a Google Doc to retrieve its title, URL, text content, and structure outline with exact indexes. Use before index-based edits to avoid errors.

Instructions

Read a Google Doc: returns its title, URL, plain-text content and (by default) a structure outline listing every top-level paragraph and table with exact startIndex/endIndex, heading style and alignment. Also returns bodyEndIndex (valid insertion indexes are 1..bodyEndIndex-1). Use this before index-based edits such as insert_text, delete_text or format_text. Long documents are truncated to maxTextLength characters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYesThe Google Docs document ID (the part between /d/ and /edit in the document URL). A full Google Docs URL is also accepted.
maxTextLengthNoMaximum number of characters of document text to return.
includeStructureNoInclude the paragraph/table outline with indexes (needed for index-based edits).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds real behavioral context beyond that: truncation of long documents to maxTextLength, the valid insertion range 1..bodyEndIndex-1, and that the structure outline is on by default. It omits auth/permission requirements and rate limits.

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?

Three sentences, front-loaded with what is returned and why it matters, and the truncation caveat placed last. Dense but no filler; slightly long clauses keep it from a 5.

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?

With no output schema, the description carries the full return-value burden and does so completely: it documents the payload fields, the bodyEndIndex validity contract, and truncation limits. An agent has everything needed to call and consume this tool.

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 coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema: it explains that includeStructure is 'needed for index-based edits' and ties maxTextLength to actual truncation behavior. The documentId param is fully documented 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?

States a specific verb+resource ('Read a Google Doc') and enumerates exactly what is returned (title, URL, plain text, structure outline, bodyEndIndex). This sharply distinguishes it from sibling readers like list_documents and search_documents.

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 states when to use it: 'Use this before index-based edits such as insert_text, delete_text or format_text.' It names the concrete sibling tools and the precondition that selects this one, leaving nothing to inference.

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