Connect the Google Docs MCP server to your AI agent Open source, MIT, on npm. Setup instructions for Claude, Cursor and Codex are in the repository; adoption questions — Telegram. GitHub repository Telegram

Google Docs: Delete a text range — MCP tool

Google Docs MCP tool: Deletes the content between two indexes — text, images or whole tables.

Technical name: delete_range

What task it solves

I want to delete part of a document.

Deletes the content between two indexes — text, images or whole tables.

When to use it

Use it to remove a passage, an inline image (delete its one-index range) or a whole table. Take fresh indexes from read_document_text immediately before the call.

What to provide

  • document_idrequired.
  • start_index / end_indexrequired. The range [start, end) to delete.
  • tab_id, segment_id — optional addressing.

What it returns

The batchUpdate reply with the new revisionId.

What changes in Google Docs

The range content is permanently removed; every later index shifts down. Deleting a paragraph's trailing newline merges it with the next paragraph.

Example request

Delete the outdated pricing table from the proposal.

Errors and limitations

Final — no undo through the API. The range must not cut across a table cell boundary, and the tab's final newline cannot be deleted. Never retried automatically after an ambiguous failure.

Access also depends on token permissions, quotas, and upstream API limits.

Related MCP tools

Technical details