Skip to main content
Glama

Insert content at a position

insert_content

Insert new markdown content into a Google Doc at the end, top, or after a unique text snippet, no anchor text required—use it to append to an empty doc or add a paragraph after a table.

Instructions

Insert NEW markdown-rendered content at a structural position — no anchor text required. at: "end" (default, the end of the doc/tab) · "top" · a unique text snippet to insert immediately after. Use this where edit_doc can’t reach: adding a paragraph after a table that ends the doc (a table’s cells can’t anchor an insert outside the table, and the trailing empty paragraph has no text to match), or appending to an empty doc. Use edit_doc instead when you are replacing or extending existing text. Content is full markdown (headings, lists, tables, images), same renderer as create_doc. A direct edit, not a tracked suggestion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atNo"end" (default) | "top" | a unique text snippet to insert right after
tabNoTarget a specific tab by tabId or title (from list_tabs). Defaults to the first tab.
pageNowhich header/footer, when a doc defines more than one (default-page, first-page, even-page). Omit to use whichever exists.
accountNoGoogle account email to use. Defaults to GDOCS_DEFAULT_ACCOUNT, or the sole account.
baseDirNoabsolute dir to resolve relative local image paths against
contentNomarkdown content to insert (or use contentFile)
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
contentFileNopath to a local markdown/text file to insert, read directly by the server — preferred for long content. Absolute, or relative to baseDir. Mutually exclusive with content.
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.
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that this is a direct edit (not a tracked suggestion), that content is full markdown with the same renderer as create_doc, and that no anchor text is required. It could additionally note behavior like failure on unmatched snippet, but the disclosed traits are useful.

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?

The description is five dense sentences with no wasted words. It front-loads the core purpose and packs usage guidance, edge cases, and rendering details efficiently.

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?

For a 10-parameter tool with no annotations and no output schema, the description covers purpose, when to use/not use, behavioral traits, and key parameter semantics. It is sufficiently complete for an agent to select and invoke it 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 description coverage is high (90%), so baseline is 3. The description meaningfully adds to the at parameter by defining 'end', 'top', and 'unique text snippet', and clarifies content supports full markdown. Other parameters rely on schema descriptions, which are adequate.

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?

Clearly states the tool inserts new markdown content at a structural position without requiring anchor text. The description distinguishes it from edit_doc by explicitly naming the alternative and defining the at-parameter options (end, top, snippet).

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

Usage Guidelines5/5

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

Gives explicit when-to-use guidance with edge cases where edit_doc cannot reach (adding after a table at end of doc, appending to empty doc). It also tells when to use edit_doc instead (replacing/extending existing text) and clarifies it is a direct edit, not a suggestion.

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