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: Insert an image — MCP tool

Google Docs MCP tool: Inserts an inline image fetched by Google from a public URL.

Technical name: insert_image

What task it solves

I want to add an image to a document.

Inserts an inline image fetched by Google from a public URL.

When to use it

Use it to place an inline image at a position (or append it). Google fetches the URL itself — the image must be publicly reachable; a local file must be hosted somewhere public first (there is no upload channel in the Docs API).

What to provide

  • document_idrequired.
  • urirequired. Public PNG/JPEG/GIF URL, at most 50 MB and 25 megapixels.
  • index — optional insertion point; omit to append.
  • width_pt / height_pt — optional display size in points.
  • tab_id, segment_id — optional addressing.

What it returns

The batchUpdate reply including the created image objectId — keep it for replace_image.

What changes in Google Docs

An inline image appears at the position, occupying one index. Later indexes shift by one.

Example request

Insert the architecture diagram from this URL under the Design heading.

Errors and limitations

Unreachable/private URLs and unsupported formats are rejected by Google. Delete an image by deleting its one-index range with delete_range; positioned (floating) objects need raw_request.

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

Related MCP tools

Technical details