Skip to main content
Glama

Insert an image

insert_image

Insert an inline image into a Google Doc from a URL or local file, positioning it at the top, end, or after specific text, and controlling size and alignment. Set the segment to "header" to add a letterhead logo that repeats across pages.

Instructions

Insert an inline image from a public URL or a local file (uploaded to Drive, embedded, then the temp upload removed). Position via at (top/end/or a unique text anchor), size via width/height (points), and align left/center/right. Set segment:"header" for a letterhead logo — that is where a repeating, correctly-sized logo belongs, and it is why a template’s logo is invisible to a body read. A direct edit, not a tracked suggestion. Note: floating/text-wrapped images are not supported by the Docs API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atNo"top", "end", or a unique text snippet to insert after (default top)
tabNoTarget a specific tab by tabId or title (from list_tabs). Defaults to the first tab.
uriYespublic image URL, or a path to a local image file (absolute, or relative to baseDir)
pageNowhich header/footer, when a doc defines more than one (default-page, first-page, even-page). Omit to use whichever exists.
alignNo
widthNopoints
heightNopoints
accountNoGoogle account email to use. Defaults to GDOCS_DEFAULT_ACCOUNT, or the sole account.
baseDirNoabsolute dir to resolve a relative local `uri` against
segmentNowhich content tree to target: body (default), or the page header/footer. Header/footer content is invisible to a body read — a letterhead logo lives there.
documentIdYes
createSegmentNowhen segment is header/footer and the doc has none, create it first (the letterhead case). Only the default header/footer can be created via the API.
Behavior5/5

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

Without annotations, the description fully discloses the local file upload workflow (uploaded to Drive, embedded, temp upload removed), states this is a direct edit not a tracked suggestion, and explains the header invisibility behavior — substantial behavioral context.

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?

Four sentences cover the core behavior, positioning, sizing, alignment, header specifics, edit type, and a limitation — every sentence carries useful information with no redundancy.

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

Completeness5/5

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

Given 12 parameters and no output schema, the description addresses the main use cases (body and header images), the local file lifecycle, and the API restriction on floating images, making it sufficient for an agent to invoke correctly.

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

Parameters4/5

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

Schema coverage is 83%, so the baseline is 3, but the description adds meaningful context to `at` (top/end/unique text anchor) and `segment` (letterhead logo example), going beyond the schema's field descriptions.

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?

The description opens with a specific verb ('Insert') and resource ('inline image'), and clarifies sources (public URL or local file), distinguishing from siblings like insert_table or insert_content. It clearly states the action and scope.

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?

It provides context for segment header as the place for a letterhead logo and notes that floating/text-wrapped images are not supported, giving implicit guidance on when this tool applies. However, it doesn't explicitly name alternative tools for unsupported cases.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dasasian/gdocs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server