gdocs-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GDOCS_DEFAULT_ACCOUNT | No | Sets which authorized account this project uses by default. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_accountsA | List the Google accounts that have been authorized for this server. |
| set_project_defaultA | Write this project’s defaults to a .gdocs-mcp.json in the current working directory (or update an existing one up the tree). Set a default account and/or a default folder (URL or id) for new docs. To set a folder by name, search_drive for it first and pass its id. |
| get_project_configA | Show the effective .gdocs-mcp.json defaults (account/folder) for the current working directory, and where the file is. |
| read_docA | Read a Google Doc as markdown + inline HTML. mode: clean (committed text, default) · tracked (suggestions shown as /) · accepted · rejected. |
| edit_docA | Replace an exact unique snippet of text in a Google Doc (like a local file Edit). old_string is matched markup-tolerantly; ambiguous matches return surrounding context to disambiguate. new_string is interpreted as inline markdown (bold, italic, |
| set_styleA | Apply styling to existing text in place (no content change), the way you select text in Docs and apply formatting. Pick ONE target: |
| get_page_setupA | Read a doc’s (or tab’s) page setup — margins, page size (in points, plus a preset name if it matches letter/legal/a4/tabloid), and orientation. The read counterpart to set_page_setup; use it to mirror another document’s layout onto a new doc. |
| set_page_setupA | Set document-level page setup for a doc (or tab): page margins, page size, and orientation — the File > Page setup controls, which set_style can’t reach. Margins and explicit page sizes are in points (72 pt = 1 inch). pageSize is a preset (letter/legal/a4/tabloid) or an explicit {width,height} in points; orientation (portrait/landscape) swaps the page dimensions. A direct change, not a tracked suggestion. |
| get_styleA | Read the effective (inherited-resolved) style at a unique text snippet — read_doc’s markdown can’t express these; the read counterpart to set_style. Returns paragraph style (namedStyleType, alignment, spaceBefore/spaceAfter in pt, lineSpacing %, and whether spacing is inherited) and text style (bold/italic/underline/strikethrough, fontSize pt, fontFamily, color hex, link). Use it to diagnose things markdown hides — e.g. an unexpected gap between paragraphs is spacing (spaceAfter>0), not a blank line, and is fixed with set_style’s spaceAfter, not edit_doc. |
| download_imagesA | Download every embedded image in a Google Doc to a local folder. Returns the objectId→filename mapping, which correlates with read_doc’s |
| insert_imageA | Insert an inline image from a public URL. Position via at (top/end/or a unique text anchor), size via width/height (points), and align left/center/right. A direct edit, not a tracked suggestion. Note: floating/text-wrapped images are not supported by the Docs API. |
| insert_tableA | Insert a rows×columns table, optionally populated from a 2D array of cell text. Position via at (top/end/or a unique text anchor, default end). A direct edit, not a tracked suggestion. |
| list_suggestionsA | List pending suggestions (tracked changes) in a Google Doc as before→after diffs, in document order. Returns the doc |
| apply_suggestionsA | Resolve one or more pending suggestions (from list_suggestions) in ONE atomic update: accept keeps the proposed text, reject keeps the original. Pass one resolution to resolve a single suggestion, or several at once — required for suggestions that overlap or adjoin each other (a "cluster"), which cannot be resolved one at a time without corrupting neighbours. You MUST include every suggestion in any cluster you touch; a partially-resolved cluster is refused (status "incomplete"). documentTitle is checked against the live document first (status "wrong_doc" on mismatch, e.g. an id from a different, similarly-titled document). Copy each suggestion's |
| list_commentsA | List comments on a Google Doc (author display name, quoted text, body, resolved status, replies). Author email is not available via the Drive API. |
| add_commentA | Add a comment to a Google Doc, or reply to an existing comment thread by passing replyTo (a comment id from list_comments). A new comment (no replyTo) is not anchored to specific text — the Docs/Drive API cannot anchor programmatically-created comments. |
| resolve_commentA | Resolve (or reopen) a comment thread by comment id. Pass expectQuote (a snippet of the comment’s quoted text or body, from list_comments) — shown for confirmation and verified against the live comment, so a wrong/stale id is refused instead of resolving the wrong thread. |
| create_docA | Create a new Google Doc with a title and optional initial content (rendered as markdown). Optionally place it in a Drive folder (by folder URL or id); otherwise it goes to My Drive root. For long documents, pass contentFile (a local path) instead of content so the server reads the body directly — retyping a long doc inline can silently drop or fuse text. |
| update_docA | Update a Google Doc’s metadata: rename it (name) and/or move it to a Drive folder (folder, by URL or id). Provide name, folder, or both. When moving, pass expectTitle (the doc’s title) — shown for confirmation and verified against the live doc before moving; if it doesn’t match, nothing is changed. (Content edits use edit_doc/overwrite_doc, not this.) |
| overwrite_docA | Replace the entire body of a doc (or one tab) with markdown-rendered content. Refuses if comments/suggestions are present (would orphan them) unless force=true. Pass expectTitle (the doc’s title) — shown for confirmation and verified against the live doc before replacing. For long documents, pass contentFile instead of content so the server reads the body directly (retyping a long doc inline can silently drop text). A direct edit, not a tracked suggestion. |
| edit_tableA | Structurally edit the table containing the given cell text: insert or delete a row or column. |
| set_table_styleA | Edit style/layout of an existing table (located by any cell’s text): cell padding (pt), background color (hex), and column widths (pt). scope selects which cells padding/background hit — table (default), row, column, or cell (the row/column of the matched cell). Fixes e.g. thin left padding that clips the first letter of cells. A direct edit, not a tracked suggestion. |
| list_folderA | List the files and subfolders directly inside a Drive folder (by URL or id). Defaults to My Drive root. |
| search_driveA | Find files/folders whose name contains the query. Optionally restrict to folders or documents. |
| list_permissionsA | List the permissions on a Google Doc (people, groups, domain, anyone-with-link) with their roles. |
| share_docA | Grant access to a Google Doc. With |
| unshare_docC | Revoke a person’s direct access to a Google Doc by email. |
| list_tabsA | List the tabs in a Google Doc (tabId, title, index, nesting). |
| add_tabA | Add a new tab to a Google Doc. Returns the new tabId. Optionally set position (index) and parent tab for nesting. |
| rename_tabC | Rename a tab by tabId. |
| delete_tabA | Delete a tab by tabId (cascades to child tabs). expectTitle (the tab’s title from list_tabs) is REQUIRED — it is shown in the confirmation and verified against the live tab, so an opaque/stale tabId cannot silently delete the wrong tab. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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