Google Docs

Google Docs

integration

Read, write, and edit your Google Docs in place

Tier-1 Google Docs integration. Reads structured Doc content, appends paragraphs and headings, runs find-and-replace, and exports to PDF, docx, or plain text. Designed to be composed by productivity and household agents (drop a generated artifact into a shared Doc, append meeting notes, template-fill a Doc from {{TOKENS}}). Also chattable directly for ad-hoc Doc work.

Source: Google Docs

Tools (21)

Search docs

Search the user's Google Docs by name / parent / modifiedTime. Always scoped to Docs โ€” non-Doc files are filtered out. Examples for `query`: "name contains 'Tokyo'", "'<folderId>' in parents and trashed = false", "modifiedTime > '2026-01-01T00:00:00Z'". Use before any mutating tool to resolve a doc by name.

List recent docs

List the user's most recently modified Google Docs, newest first.

Get doc metadata

Fetch full metadata for a single Doc by id. Always call this before a destructive mutation to confirm the right doc.

Get doc permissions

List who has access to a Doc and at what role. Returns one entry per principal (user, group, domain, anyone).

List revisions

List revisions of a Doc. Each entry has id, modifiedTime, lastModifyingUser, and size. Use to audit who changed what when.

Read doc content

Return the structured body of a Doc: title plus an ordered list of paragraphs with their headingId, named style, and text. Use when you need to find headings or specific structural elements before editing. For plain-text content prefer read_doc_text.

Read doc text

Return the plain-text content of a Doc, exported via Drive. Good for summarizing, extracting, or diffing. Use read_doc_content when you need heading structure too. Capped at 25 MB.

Append doc text

Append text to the end of a Doc. Optional `heading_level` (1-6) wraps the text in a heading style; otherwise it's added as normal body text. Each call adds a leading newline so successive appends do not run together.

Replace doc text

Find and replace text across a Doc. Replaces every occurrence of `find` with `replace`. Useful for templating: create a Doc from a template, then swap {{NAME}}, {{DATE}}, etc.

Export doc

Export a Doc to a downloadable format. Common targets: 'application/pdf', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' (docx), 'text/plain', 'text/html'. Returns base64 bytes. Capped at 25 MB.

Create doc

Create a new empty Google Doc. Optional `parents=[<folderId>]` to place it in a folder; defaults to the user's root. Optional `initial_text` writes a first paragraph after creation.

Rename doc

Rename a Doc without moving it.

Copy doc

Duplicate a Doc. Optional new name and destination parents. Useful for templating: copy a template, then `replace_doc_text` the {{TOKENS}} in the copy.

Trash doc

Move a Doc to the Drive trash. Recoverable via untrash_doc or the Drive UI for 30 days. Prefer this over delete_doc.

Untrash doc

Restore a trashed Doc to its previous parent folder.

Delete doc

Permanently delete an entire DOC FILE, bypassing trash. DESTRUCTIVE and unrecoverable. Only call this when the user explicitly says 'delete the doc' / 'delete the file' / 'permanently'. For routine removal use trash_doc. The `confirm` argument must exactly match the doc's current name โ€” fetch via get_doc_metadata and read it back to the user before they confirm.

Share doc

Add a permission to a Doc. Type is 'user' / 'group' / 'domain' / 'anyone'. Role is 'reader' / 'commenter' / 'writer' / 'owner'. Confirm before sharing externally (outside the user's domain) or granting writer/owner.

Update permission

Change the role on an existing Doc permission. Use to upgrade a commenter to a writer, or downgrade a writer to a reader. To remove access entirely, use remove_permission.

Remove permission

Revoke access for a single permission entry. DESTRUCTIVE: the principal loses access immediately. The `confirm` argument must exactly match the principal's email address (or displayName for non-user permissions) โ€” fetch via get_doc_permissions and read it back to the user before they confirm.

Format doc text

Apply text formatting to a range of characters in a Doc. The range is the half-open [start_index, end_index) using the document's character offsets โ€” get them from `read_doc_content`. Pass only the keys you want to change.

Format doc paragraphs

Apply paragraph formatting to a range: alignment, named style (Title / Heading 1-6 / Normal text), line spacing, and indents. The range is [start_index, end_index) over the document's character offsets โ€” every paragraph that touches that range receives the style.

Chat with Google Docs

Open chat