Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
XDG_CONFIG_HOMENoBase config directory. Default: ~/.config~/.config
GDRIVE_MCP_TOKENNoPath to cached per-user OAuth token. Default: ~/.config/gdrive-mcp/token.json~/.config/gdrive-mcp/token.json
GDRIVE_MCP_AUDIT_LOGNoPath to audit log file. Default: audit.log in the config dir.
GDRIVE_MCP_FILES_DIRNoSandbox directory for local file I/O (downloads, exports, uploads). Default: ~/.config/gdrive-mcp/files~/.config/gdrive-mcp/files
GDRIVE_MCP_OAUTH_CLIENTNoPath to the Desktop-app OAuth client JSON file. Default: ~/.config/gdrive-mcp/oauth_client.json~/.config/gdrive-mcp/oauth_client.json
GDRIVE_MCP_CALLING_MODELNoOperator-controlled caller-model pin, used when the client does not send _meta.model.
GDRIVE_MCP_FILES_TTL_HOURSNoAge in hours after which spilled sandbox files are swept on server start; '0' disables. Default: '24'24
GDRIVE_MCP_OAUTH_CLIENT_CMDNoCommand that prints the OAuth client JSON. Alternative to GDRIVE_MCP_OAUTH_CLIENT.
GDRIVE_MCP_REQUIRE_VERIFICATIONNoSet to 'always' to gate every call regardless of model (anti-delegation hard override).
GDRIVE_MCP_VERIFICATION_MODEL_PATTERNSNoComma-separated model-name substrings that require per-call verification.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
resolve_linkA

Resolve a Google Drive/Docs/Sheets URL or bare ID (item) to its id, kind, name and link.

search_filesA

Search Drive by name, full-text content, mime type, and/or parent folder.

Returns one page; when `has_more` is true, pass the returned `next_page_token` to continue.
`incomplete_search` true means Drive couldn't search every corpus (results may be partial).
list_folderA

List the direct children of a folder (item = folder URL or ID).

Returns one page; when `has_more` is true, pass the returned `next_page_token` to continue.
get_metadata

Full metadata for a file: owner, timestamps, size, parents, sharing link.

read_sheet

Preview a spreadsheet (item = URL or ID): the first max_rows x max_cols (default 5x5) of each tab.

A quick, context-safe peek. For the complete data use read_full_sheet (which saves it to a local
file). Pass an explicit a1_range to read exactly that range instead of the preview window.
values: UNFORMATTED | FORMATTED | FORMULA (FORMULA returns cell formulas).
read_full_sheetA

Read an entire sheet tab, save it to a local CSV, and return the path + a 5x5 preview.

Reads the full tab (item = URL or ID; default first tab) via the Sheets API, writes it to
dest_path (resolved inside the sandbox files dir; a sanitized default name otherwise), and
returns total_rows/total_cols plus the same first-5-rows/cols preview as read_sheet. Use this
instead of read_sheet when you need the complete data without flooding the context.
write_sheetA

Write rows to a tab of a spreadsheet (item), starting at start_cell (default A1).

value_input RAW (default) stores cell text literally; pass 'USER_ENTERED' to interpret typed
values/formulas (a leading '=' becomes a live formula). Overwriting existing non-empty cells
requires confirm=true. dry_run=true returns a predicted before/after (client-side) without
writing; formula cells are shown literally (Google's recalculation is not simulated).
append_rowsA

Append rows after the last row of a tab of a spreadsheet (item). Non-destructive.

value_input RAW (default) stores cell text literally; 'USER_ENTERED' interprets formulas/typed
values. dry_run=true returns where the rows would land (predicted) without appending.
format_cellsA

Set text formatting (bold/italic/underline) on a bounded A1 range of a spreadsheet (item).

a1_range like 'Data!A1:C10' or a single cell 'Data!B2' (no tab prefix targets the first
tab; open-ended ranges like 'A:C' are rejected). Each flag is tri-state: true applies it,
false removes it, unset leaves that property as-is. Formatting only — cell values are
untouched. dry_run=true returns the resolved target without writing. (Headings, bullets,
and rich text are Docs concepts: see append_text/create_document with markdown=true.)
create_spreadsheetB

Create a new spreadsheet with optional named tabs.

add_tab

Add a new tab (sheet) to an existing spreadsheet (item).

clear_rangeA

Clear all values in an A1 range of a spreadsheet (item), e.g. 'Data!A2:C10'. Requires confirm=true.

dry_run=true returns the values that would be cleared (before) without clearing.
delete_rows

Delete count rows starting at start_row (1-based) from a tab of a spreadsheet (item). Requires confirm=true.

dry_run=true returns the rows that would be deleted without deleting.
read_documentA

Read a Google Doc (item = URL or ID) as 'markdown' (default) or 'text', one bounded chunk at a time.

Multi-tab docs: by default every tab is read (each prefixed with its title as a heading);
pass a `tab` id, or an `item` URL containing `tab=t.xxxx`, to read only that tab. Returns the
requested chunk (0-based) plus title, the doc's `tabs`, the outline, and paging metadata
(total_chunks, total_chars, has_more). Set max_chars<=0 to get the whole document. Set
include_colors=true to also return `colored_runs` (text spans with an explicit foreground color).
extract_images

Extract embedded images from a Google Doc (item = URL or ID) as viewable images, in order.

Returns both inline images and positioned (floating/wrapped) images, each emitted at the
paragraph it is anchored to. Multi-tab docs: all tabs by default; pass a `tab` id or an
`item` URL with `tab=t.xxxx`.
create_documentA

Create a new Google Doc (in My Drive root), optionally with initial text content.

markdown=true renders `text` with the same dialect as append_text: headings, bullets,
numbered lists, **bold**, *italic*, <u>underline</u>. (For spreadsheets use
create_spreadsheet.)
append_text

Append text to the end of a Google Doc (item = URL or ID).

markdown=true renders a small dialect instead of storing text verbatim: '#'..'######'
headings, '-'/'*' bullets, '1.' numbered lists (nest with two spaces or a tab per level),
**bold**, *italic*, <u>underline</u>. No escape syntax — text that looks like markup gets
styled; leave markdown unset to write literally. Block content (headings/lists) starts on
its own paragraph rather than merging into the doc's last line. Multi-tab docs: appends to
the given `tab` (id, or an `item` URL with `tab=t.xxxx`), else the first tab. `color` (hex
like '#3366CC') colors the inserted text; leave it unset for plain text. dry_run=true
returns a predicted before/after of the tab's tail without writing.
insert_text

Insert text at a character index in a Google Doc (item = URL or ID).

markdown=true renders the same dialect as append_text (headings, bullets, numbered lists,
**bold**, *italic*, <u>underline</u>); note heading/list styles apply to the whole
paragraphs the insertion touches, so insert block markdown at a paragraph boundary.
Multi-tab docs: pass a `tab` (id, or an `item` URL with `tab=t.xxxx`), else the first tab.
`color` (hex like '#3366CC') colors the inserted text; leave it unset for plain text.
dry_run=true reports what would be inserted and where without writing. (`index` is a Docs
structural offset, so the exact merged text isn't reconstructed client-side.)
read_commentsA

List comments on a Doc or file (item = URL or ID).

Returns one page; when `has_more` is true, pass the returned `next_page_token` to continue.
add_comment

Add an (unanchored) comment to a Doc or file (item = URL or ID).

read_file_as_textA

Read a file's content as text, one bounded chunk at a time.

Google-native files are exported; PDFs are text-extracted. Returns the requested chunk
(0-based) in `content` plus name, mime_type, and paging metadata (total_chunks,
total_chars, has_more) — page through by incrementing chunk. Set max_chars<=0 for the
whole document.
download_file

Download a binary file. Small (<5MB, no dest_path) → base64 inline; otherwise written to the sandbox files dir (dest_path is resolved inside it; absolute/.. rejected).

upload_file

Create a new Drive file (from source_path or text content), or replace an existing file's content (replace_id — requires confirm=true). source_path must be inside the sandbox files dir.

move_file

Move a file (item) into a different folder (parent). Requires confirm=true.

rename_fileC

Rename a file. Requires confirm=true.

export_file

Export a Google-native file to a format: pdf, docx, xlsx, pptx, csv, txt, md, html.

Written to the sandbox files dir when large or dest_path is given (dest_path resolved inside
it); small exports return base64 inline. (Drive's export method has no supportsAllDrives param.)

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/shivankj11/gdrive-mcp'

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