Download a doc’s images
download_imagesDownloads every embedded image from a Google Doc into a local folder and returns an objectId-to-filename mapping for rewriting image markers to local paths.
Instructions
Download every embedded image in a Google Doc to a local folder. Returns the objectId→filename mapping, which correlates with read_doc’s <img src="image:<objectId>"> markers so you can rewrite them to local paths (the inverse of publishing).
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": {
"path": "<path>",
"dir": "<dir>"
},
"name": "download_images"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dir | Yes | absolute local folder to save images into (created if missing) | |
| path | Yes | The doc or tab: a Drive id or URL, /folder/doc, or /folder/doc/tab (nested: /folder/doc/tab/child). A doc with one tab needs no tab step; a doc with several is refused until one is named, and the refusal lists every tab path. | |
| account | No | Google account email to use. Defaults to GDOCS_DEFAULT_ACCOUNT, or the sole account. |