insertImage
Insert an inline image into a Google Doc from a public URL or local file path, uploading local files to Drive first. Specify the document ID and character index for placement.
Instructions
Inserts an inline image into a Google Document. Provide either a publicly accessible URL or a local file path. Local files are automatically uploaded to Google Drive before insertion.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"documentId": "<documentId>",
"index": "<index>"
},
"name": "insertImage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | 1-based character index in the document body where the image should be inserted. Use readDocument with format='json' to inspect indices. | |
| tabId | No | The ID of the specific tab to insert into. Use listDocumentTabs to get tab IDs. If not specified, inserts into the first tab. | |
| width | No | Width of the image in points. | |
| height | No | Height of the image in points. | |
| imageUrl | No | Publicly accessible URL to the image (http:// or https://). | |
| documentId | Yes | The document ID — the long string between /d/ and /edit in a Google Docs URL. | |
| readHandle | No | Capability returned by a previous readDocument call for this document (and tab). Required over HTTP on the 2026-07-28 runtime: it authorizes the write and pins it to the revision that read saw. Omit it on stdio to use that connection's most recent read. | |
| localImagePath | No | Absolute path to a local image file (supports .jpg, .jpeg, .png, .gif, .bmp, .webp, .svg). The file will be uploaded to Google Drive. |