Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ASKADS_TELEMETRYNoSet to '0' to opt out of anonymous telemetry.
GOOGLE_DOCS_API_BASENoGoogle Docs API base URL override.
GOOGLE_DOCS_CLIENT_IDNoOAuth client ID.
GOOGLE_DOCS_TIMEOUT_MSNoPer-request timeout; default 60000 ms.
GOOGLE_DOCS_MAX_RETRIESNoTemporary-error retries; default 3.
GOOGLE_DOCS_ACCESS_TOKENNoShort-lived alternative to the OAuth trio (~1 hour).
GOOGLE_DOCS_CLIENT_SECRETNoOAuth client secret.
GOOGLE_DOCS_REFRESH_TOKENNoOAuth refresh token.
GOOGLE_DOCS_DRIVE_API_BASENoDrive API base URL override (export, Markdown, comments).

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
auth_statusA

Shows whether this server is connected to Google: token presence and source (env variables or a stored in-chat login), expiry, the Google account email, granted vs missing OAuth scopes, where the credentials file lives and where the OAuth client comes from. Makes no network calls and never returns the token itself. Call it first when other tools report the server is not connected.

setup_instructionsA

Step-by-step checklist for connecting this server to Google: creating a Google Cloud project and a Desktop-app OAuth client, publishing the consent screen (mandatory — Testing-mode refresh tokens die after 7 days), downloading the client JSON and handing its PATH to set_client. Works without any credentials; the checklist shortens to 'enable the API + log in' when an OAuth client is already configured (one client serves the whole mcp-google-* line). Never asks the user to paste secrets into the chat.

set_clientA

Saves the OAuth client credentials from the JSON file downloaded from Google Cloud Console ('Download JSON' on a Desktop-app client). Pass the file PATH — the secret must never be pasted into the chat. The client is stored once in the shared ~/.config/mcp-google-auth/client.json (owner-only) and reused by every mcp-google-* server; tokens stay per-server. After this, call start_login.

start_loginA

First step of connecting from the chat, without editing config files or restarting the client. Returns authorizeUrl — show it to the user as a clickable link and ask them to open it in the browser ON THIS MACHINE, pick the Google account and approve access. A one-shot listener on 127.0.0.1 catches Google's redirect; the code is exchanged locally and never passes through the chat. Does not open the browser itself. The attempt lives 10 minutes; when the browser shows the success page, call finish_login.

finish_loginA

Second step: confirms the browser consent finished, saves the tokens to an owner-only file and verifies the login with a read-only identity call, returning the account email and the granted scopes. After success every tool works immediately — no client restart. If the user granted only part of the requested permissions, the login is still saved and missingScopes lists what will not work. Logging in under a different Google account replaces the previous login (its refresh token is revoked best-effort) and the response carries previousAccountEmail so the change never goes unnoticed.

logoutA

Revokes the stored token at Google (oauth2.googleapis.com/revoke) and deletes the local credentials file. Tokens supplied via env variables are NOT touched — remove them from the MCP client config manually; envTokenStillSet in the response says whether any are still in effect.

create_documentA

Creates a new Google Doc and returns its documentId. Without markdown it calls documents.create, which accepts ONLY a title — add content afterwards with insert_text/import_markdown. With markdown, the document is created from that Markdown via Drive conversion (headings, bold/italic, links, lists, tables and code blocks become native Docs formatting) and the result carries id (the documentId), name and mimeType. The document lands in the authorized user's My Drive root; moving or sharing it needs the Drive UI or API, which this server does not cover.

get_documentA

Returns the raw Docs API document: title, documentId, revisionId, per-tab body with every structural element's startIndex/endIndex, textRun styles, tables, lists, inlineObjects (image ids for replace_image), headers/footers (their segment ids) and named styles. This is the exact index map that range tools consume, but it is VERBOSE — for reading content prefer read_document_text, which returns compact blocks with the same indexes. include_tabs_content=true (default) populates all tabs; suggestions_view_mode controls how unresolved suggestions render (default DEFAULT_FOR_CURRENT_ACCESS).

read_document_textA

Returns the document as compact readable blocks, per tab: each paragraph with its text, start/end indexes (UTF-16 code units — the coordinates insert_text/replace_range/delete_range/style tools take), named style (headings) and bullet flag; tables come as cells[row][column] plain text with the table's range. Inline images appear as [image:] placeholders (the id feeds replace_image). tab_id limits the output to one tab. Call this before any range edit — every insert/delete shifts later indexes, so indexes from before a mutation are stale.

list_tabsA

Returns the document's tab tree without content: tabId, title, position index and nested childTabs. Use the tabId values to target a specific tab in read_document_text and every editing tool. NOTE: the Docs API cannot create, rename, delete or reorder tabs — that is UI-only; this tool only discovers what exists.

export_documentA

Exports the document via Drive. Text formats (markdown, txt, html) are returned inline as the tool result — format=markdown is the way to read a doc as Markdown for a round trip with import_markdown. Binary formats (pdf, docx, odt, rtf, epub) require output_path and are written to that local file (the result reports saved_to and bytes); output_path also works for text formats. output_path must be absolute, and an existing file is never overwritten unless overwrite=true. Exports are capped at 10 MB by the Drive API; comments and suggestions are not part of any export. Nothing in Google Docs changes; the only side effect is the local file when output_path is set.

import_markdownA

REPLACES the ENTIRE document content with the given Markdown via Drive conversion — the Markdown round-trip writer paired with export_document format=markdown. Supported Markdown (headings, bold/italic/strikethrough, links, ordered/unordered lists, tables, code blocks, images by URL) becomes native Docs formatting. Everything not expressed in the Markdown is LOST: existing text, comment anchors (comments survive but detach), positioned objects, headers/footers and extra tabs. For surgical edits use replace_range/style tools instead. Returns the Drive file resource (id, name, modifiedTime).

insert_textA

Inserts plain text at an index (UTF-16 code units; body content starts at index 1 — get indexes from read_document_text). Omit index to append at the end of the body (or of the segment when segment_id is set). Newlines in the text create new paragraphs; the text inherits the style at the insertion point — style it afterwards with style_text/style_paragraph. Every insert shifts all later indexes, so when making several edits, apply them from the END of the document backwards or re-read between edits. Returns the batchUpdate reply with the new revisionId.

replace_rangeA

Replaces the content in [start_index, end_index) with new text — one atomic batchUpdate that deletes the range and inserts at its start, so nothing is lost if either step would fail. Get fresh indexes from read_document_text first: indexes are stale after ANY previous edit. The new text takes the style at start_index. Cannot cut across a table cell boundary or delete a paragraph's final newline together with only part of the next paragraph — the API rejects such ranges. An empty replacement is allowed and equals delete_range.

replace_all_textA

Replaces EVERY occurrence of a literal string (no regex) across the whole document, or only in the tabs named by tab_ids. match_case defaults to true. Returns occurrencesChanged in the batchUpdate reply — 0 means the text was not found, not an error. Safer than replace_range for textual substitutions because it does not depend on indexes; use replace_range when position matters (e.g. only one of several occurrences).

delete_rangeA

Deletes the content in [start_index, end_index) — text, inline images, whole tables or any mix, as long as the range does not cut across a table cell boundary. Get fresh indexes from read_document_text first; every delete shifts all later indexes down. Deleting a paragraph's trailing newline merges it with the next paragraph. The tab's final newline cannot be deleted. This is final — there is no undo through the API.

style_textA

Applies character formatting to [start_index, end_index): bold, italic, underline, strikethrough, small_caps, font_size (points), font_family (e.g. "Roboto"), foreground_color/background_color (6-digit hex), link_url (empty string removes an existing link) and baseline_offset (superscript/subscript/none). Only the provided fields change (the fields mask is computed); at least one is required. Explicit false turns a toggle off. Get indexes from read_document_text. Styling does not shift indexes, so several style calls can safely reuse the same coordinates.

style_paragraphA

Applies paragraph formatting to every paragraph overlapping [start_index, end_index): named_style (normal_text, title, subtitle, heading_1..heading_6 — the way to make headings), alignment (start/center/end/justified), line_spacing (100 = single, 200 = double), space_above/space_below (points), indent_start/indent_end/indent_first_line (points), keep_with_next and direction (ltr/rtl). Only the provided fields change; at least one is required. A range inside a single paragraph styles that whole paragraph.

set_paragraph_bulletsA

Turns the paragraphs overlapping [start_index, end_index) into a list, or removes their bullets with remove=true. Presets: disc, arrow, checkbox, star, diamond (bulleted); decimal, decimal_parens, decimal_nested, upper_alpha, upper_roman, zero_decimal (numbered). Nesting follows each paragraph's leading tabs — indent with \t in insert_text before applying bullets to create sub-items. Exactly one of preset or remove is required.

insert_tableA

Inserts an empty rows x columns table at an index, or at the end of the body when index is omitted. Fill the cells afterwards: read_document_text shows the new table's range and per-cell layout, then insert_text into each cell (cell content ranges are visible in get_document; each cell holds its own paragraphs). Cell merging, cell background/borders and pinned header rows are not covered by typed tools — use raw_request with mergeTableCells/updateTableCellStyle/pinTableHeaderRows.

edit_tableA

Inserts or deletes a row/column of an existing table. The table is addressed by table_start_index — the table block's start index from read_document_text (its startIndex in get_document). action=insert_row adds next to the cell at row_index/column_index (insert_below, default true); insert_column likewise (insert_right, default true); delete_row / delete_column remove the row/column containing that cell WITH ALL ITS CONTENT — that content is unrecoverable. row_index/column_index are 0-based and default to 0. Deleting shifts every later index in the document; re-read before further edits.

insert_breakA

Inserts a break at an index (or at the end of the body when index is omitted). kind=page starts a new page; kind=section_next_page starts a new section on a new page; kind=section_continuous starts a new section on the same page. Sections carry their own margins/columns — style them via raw_request updateSectionStyle. Breaks cannot be inserted into headers, footers, footnotes or table cells. A break occupies one index position; remove one by deleting its range with delete_range.

insert_imageA

Inserts an inline image fetched from a PUBLIC URL at an index (or at the end of the body when index is omitted). The URL must be reachable by Google without auth, at most 50 MB and 25 megapixels, in PNG, JPEG or GIF; there is no upload channel — a local file must be hosted somewhere public first. width_pt/height_pt set the displayed size in points (omit both for natural size capped to the page width; when only one is given the API scales the other to keep the aspect ratio). Returns the created objectId in the reply — keep it for replace_image. Delete an image by deleting its range with delete_range (it occupies one index).

replace_imageA

Replaces an existing image's contents with a new image from a public URL, keeping the original's size and position (the new image is center-cropped to fit). image_object_id is the inline object id — read_document_text shows it inside [image:] placeholders, and get_document lists all ids under inlineObjects. The same URL rules as insert_image apply (public, <=50 MB, <=25 MP, PNG/JPEG/GIF).

list_commentsA

Lists the document's comment threads via the Drive API: for each comment its id, content, author displayName, createdTime/modifiedTime, resolved flag, the quoted document text it anchors to (quotedFileContent) and its replies (with their action: resolve/reopen). Paginate with page_token; include_deleted=true also returns deleted comments as tombstones. Requires a Drive scope on the OAuth token (comments are Drive data, not Docs API data). Comment ids feed manage_comment.

manage_commentA

Manages comment threads via the Drive API. action=create adds a NEW comment (needs content; optional quoted_text cites a passage — the API cannot anchor a new comment to a live range, that anchor format is not public, so it appears at document level). action=reply adds a reply (needs comment_id + content). action=resolve closes the thread (needs comment_id; optional content posts a closing reply); action=reopen reactivates it. action=delete PERMANENTLY removes the comment and all its replies (needs comment_id) — deleting is final, resolving is the reversible way to close a thread. Get comment_id from list_comments. Requires a Drive scope on the OAuth token.

raw_requestA

Escape hatch to call any Google Docs API v1 path directly, for requests the typed tools don't cover — e.g. a batchUpdate with mergeTableCells, updateTableCellStyle, pinTableHeaderRows, updateSectionStyle, updateDocumentStyle, createHeader/createFooter, createFootnote, named ranges, or several requests at once with writeControl.requiredRevisionId: path "v1/documents/:batchUpdate", method POST, body {"requests":[...]}. The path may carry a query string. The Bearer token is added automatically; the method defaults to GET. Only docs.googleapis.com paths are reachable — Drive endpoints are not exposed here.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.1/5.0

Scored across 27 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: auth flow tools are sequential and unambiguous, document retrieval tools separate raw vs. compact reading, and editing tools cover insert/replace/delete/style/table/image/comments with no functional overlap. The raw_request escape hatch is explicitly labeled and does not compete with typed tools.

Naming Consistency4/5

The set predominantly follows a snake_case verb_noun pattern (create_document, insert_text, style_paragraph, list_comments). A few tools break the pattern (auth_status, setup_instructions, logout, raw_request), but casing is consistent and the deviations remain readable.

Tool Count2/5

With 27 tools, the server exceeds the typical 3-15 range and crosses the 25+ threshold for 'too many.' Although the Google Docs API is complex, six auth-related tools and many granular editing tools could be consolidated or delegated to raw_request.

Completeness3/5

Core document reading, editing, formatting, table/image insertion, and comment management are well covered, and raw_request fills API gaps. However, the surface lacks document deletion, document listing/search, and native header/footer/footnote creation (only via raw_request), which are notable omissions for an agent working with Google Docs.

Maintenance

ActivityMaintained
ResponsivenessNo issues