Skip to main content
Glama

Read document as text

read_document_text
Read-onlyIdempotent

Fetch a Google Doc's text as structured blocks with paragraph text, indexes, styles, bullets, and tables. Read before edits to get accurate positions, as indexes shift after mutations.

Instructions

Returns the document as compact readable blocks, per tab: each paragraph with its text, start/end indexes (UTF-16 code units — the coordinates insert_text/replace_range/delete_range/style tools take), named style (headings) and bullet flag; tables come as cells[row][column] plain text with the table's range. Inline images appear as [image:] placeholders (the id feeds replace_image). tab_id limits the output to one tab. Call this before any range edit — every insert/delete shifts later indexes, so indexes from before a mutation are stale.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idNoTab to target (from list_tabs). Omit for the first/only tab.
document_idYesThe document id — the long id from the document URL (docs.google.com/document/d/<documentId>/edit) or from create_document output.
Behavior5/5

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

Annotations already mark it read-only, idempotent, and non-destructive, and the description adds substantial behavioral detail beyond that: UTF-16 code-unit indexing, table cell layout, image placeholder syntax, and the stale-index warning after mutations. This is exactly the context an agent needs to interpret results safely.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but every clause earns its place, and the most important facts (content blocks and index coordinates) come first. The structure groups paragraphs, tables, and images cleanly before the usage warning.

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 available, the description fully carries the burden of explaining return values, and it does so: blocks, ranges, styles, bullets, tables, image placeholders, and tab limiting. It also includes the critical caveat about stale indexes, making the tool callable correctly without further research.

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 meaningful param behavior: tab_id limits output to one tab and the returned coordinates are the ones accepted by edit tools. It does not repeat schema text verbatim and clarifies what changes when tab_id is omitted.

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 names a specific action ('Returns the document as compact readable blocks, per tab') and details the exact content shape: paragraph text, index ranges, styles, bullets, tables, and image placeholders. This clearly distinguishes it from sibling tools like get_document or export_document, which serve different retrieval purposes.

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 gives an explicit use directive: 'Call this before any range edit,' with a concrete reason that mutation shifts indexes. It does not explicitly name when-not-to-use it or route to an alternative, so it stops short of a full 5.

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/A1-x-Tech/mcp-google-docs'

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