Skip to main content
Glama

Download a doc’s images

download_images

Downloads 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

NameRequiredDescriptionDefault
dirYesabsolute local folder to save images into (created if missing)
pathYesThe 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.
accountNoGoogle account email to use. Defaults to GDOCS_DEFAULT_ACCOUNT, or the sole account.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.0.0
    • removedInput schema / properties / documentId
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / path
      Added value: +{
      +  "description": "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.",
      +  "type": "string"
      +}
    • removedInput schema / properties / tab
      Removed value: -{
      -  "description": "Target a specific tab by tabId or title (from list_tabs). Defaults to the first tab.",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "documentId",
      -  "dir"
      -]New value: +[
      +  "path",
      +  "dir"
      +]
  2. First observedv0.1.1

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the burden and does disclose the meaningful behavioral facts: it writes files to a local folder and returns an objectId→filename mapping whose format is tied to read_doc's markers. It stays silent on collision/overwrite behavior for existing files and on partial-failure semantics, which are the notable remaining gaps for a filesystem-writing tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler, with the core action front-loaded and the return-value detail immediately after. Every clause carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description correctly spells out the return value and its downstream use. Combined with the fully documented schema it is nearly complete; only overwrite/error behavior for the target folder is left unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema already explains path resolution (id/URL, folder/doc/tab), the multi-tab refusal, and that dir is created if missing. The description adds no parameter-level detail beyond that, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource with a clear scope: 'Download every embedded image in a Google Doc to a local folder.' It also positions itself relative to read_doc by naming the exact marker format its output maps to, so an agent can tell what it produces and how it complements a sibling rather than duplicating it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete downstream use case: the objectId→filename mapping lets you rewrite `<img src="image:<objectId>">` markers to local paths, framed as 'the inverse of publishing.' That is clear context for when to reach for it, but it never names an alternative (e.g., export_doc) or states when this is the wrong choice (e.g., whole-document export instead of per-image extraction).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.