Skip to main content
Glama

drive_docs_read

Read a document's paragraphs, tables, and headers with [start,end) index ranges for precise edits, not just prose export.

Instructions

Read a document's structural elements — paragraphs, tables, section breaks and more — each with its [start,end) index range in UTF-16 code units, plus headers/footers/footnotes and the document's revision_id. This is the model channel (indices for a later edit); drive_file_read's markdown export is the prose channel and has no way back to an index. tab restricts to one tab id (from drive_docs_info); omit to read every tab. suggestions_view controls which view the indices are reported against — indices from one view only apply to an edit made under that same view. When output_file is set, writes the YAML result to that path and returns a short summary instead — recommended for a large document. Read-only — no write gate, lease or dry-run applies (unlike docs replace/append, exposed by separate gated write tools). Mirrors omni-dev drive docs read. Output is YAML.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabNoRestrict output to one tab id (see `drive_docs_info`'s `tabs[].tab_id`). Omit to read every tab.
accountNoSelects a named Drive account instead of the ambient `--account`/`OMNI_DEV_DRIVE_ACCOUNT` resolution — e.g. `work`. Omit to use the resolved default account (or the legacy single-account credentials, if no named accounts are configured). Call `drive_account_list` to discover configured names.
document_idYesDocument id (the `/d/<ID>/` segment of a Docs URL, e.g. `1a2B3c4D5e6F7g8H9iJ0kLmNoPqRsTuVwXyZ`). Required.
output_fileNoWhen set, writes the result (YAML) to this path and returns a short summary instead of the inline body — recommended for a large document that would exceed the response size limit.
suggestions_viewNoWhich suggestion view the text and `[start,end)` indices are reported against: `default` (whatever the caller's access implies — inline for an editor, accepted for a reader; the default when omitted), `inline` (suggestions shown as tracked changes), `accepted` (as if every suggestion were accepted), or `without` (as if every suggestion were rejected). Indices from one view are only meaningful for a later edit made under that same view — a different view can shift every index.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.44.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it declares read-only status, that no write gate/lease/dry-run applies, that `output_file` writes to disk and returns only a summary, that output is YAML, and that indices are reported in UTF-16 code units. It omits auth/account resolution detail (left to the schema) and any rate-limit or size-threshold specifics.

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?

Front-loaded with the core purpose, then parameter guidance, then the read-only/write-gate note, then CLI mirror and output format. Dense and mostly waste-free, though the trailing 'Mirrors `omni-dev drive docs read`. Output is YAML.' is two short fragments that could be merged.

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?

No output schema exists, so the description must explain the return value — and it does (YAML structural elements with index ranges, headers/footers/footnotes, revision_id, plus the summary-only mode when `output_file` is set). With no annotations, it also supplies the safety profile. Nothing an agent needs to call this correctly is missing.

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 baseline is 3, but the description adds genuine meaning beyond the schema: the model-channel framing ('indices for a later edit'), the cross-reference to `drive_docs_info` for tab ids, and the critical invariant that indices from one view are only valid for an edit under that same view. This is more than restating field docs.

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 document's structural elements) and enumerates the exact payload — paragraphs, tables, section breaks, headers/footers/footnotes, revision_id. It explicitly distinguishes itself from the sibling `drive_file_read` by naming it and contrasting the 'model' vs 'prose' channel.

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?

Explicit routing: use this when you need indices for a later edit, use `drive_file_read` when you want prose. Gives conditions for each parameter — omit `tab` to read all tabs, set `output_file` for large documents, pick a `suggestions_view` that matches your eventual edit. Also clarifies it is not a write tool unlike `docs replace`/`append`.

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