Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ALLOWED_FILE_DIRSNoComma-separated list of directories allowed for file uploads. Default: ~/.workspace-mcp/attachments/
GOOGLE_OAUTH_CLIENT_IDNoGoogle OAuth client ID (alternative to GOOGLE_CLIENT_SECRET_PATH).
GOOGLE_CLIENT_SECRET_PATHNoAbsolute path to the Google OAuth client secret JSON file.
GOOGLE_OAUTH_CLIENT_SECRETNoGoogle OAuth client secret (alternative to GOOGLE_CLIENT_SECRET_PATH).

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
start_google_authA

Manually initiate Google OAuth authentication flow.

NOTE: This is a legacy OAuth 2.0 tool and is disabled when OAuth 2.1 is enabled. The authentication system automatically handles credential checks and prompts for authentication when needed. Only use this tool if:

  1. You need to re-authenticate with different credentials

  2. You want to proactively authenticate before using other tools

  3. The automatic authentication flow failed and you need to retry

In most cases, simply try calling the Google Workspace tool you need - it will automatically handle authentication if required.

search_gmail_messagesA

Searches messages in a user's Gmail account based on a query. Returns both Message IDs and Thread IDs for each found message, along with Gmail web interface links for manual verification. Supports pagination via page_token parameter.

get_gmail_message_contentA

Retrieves the full content (subject, sender, recipients, body) of a specific Gmail message.

get_gmail_messages_content_batchA

Retrieves the content of multiple Gmail messages in a single batch request. Supports up to 25 messages per batch to prevent SSL connection exhaustion.

get_gmail_attachment_contentA

Downloads an email attachment and saves it to local disk.

In stdio mode, returns the local file path for direct access. In HTTP mode, returns a temporary download URL (valid for 1 hour). May re-fetch message metadata to resolve filename and MIME type.

send_gmail_messageA

Sends an email using the user's Gmail account. Supports both new emails and replies with optional attachments. Supports Gmail's "Send As" feature to send from configured alias addresses.

draft_gmail_messageA

Creates a draft email in the user's Gmail account. Supports both new drafts and reply drafts with optional attachments. Supports Gmail's "Send As" feature to draft from configured alias addresses.

get_gmail_thread_contentA

Retrieves the complete content of a Gmail conversation thread, including all messages.

Optionally also returns structured ownership analysis so a caller can determine who sent the last message and who owes whom a response without re-parsing the formatted string or making a second tool call.

get_gmail_threads_content_batchA

Retrieves the content of multiple Gmail threads in a single batch request. Supports up to 25 threads per batch to prevent SSL connection exhaustion.

list_gmail_labelsA

Lists all labels in the user's Gmail account.

manage_gmail_labelB

Manages Gmail labels: create, update, or delete labels.

list_gmail_filtersA

Lists all Gmail filters configured in the user's mailbox.

manage_gmail_filterB

Manages Gmail filters. Supports creating and deleting filters.

modify_gmail_message_labelsA

Adds or removes labels from a Gmail message. To archive an email, remove the INBOX label. To delete an email, add the TRASH label.

batch_modify_gmail_message_labelsA

Adds or removes labels from multiple Gmail messages in a single batch request.

search_drive_filesA

Searches for files and folders within a user's Google Drive, including shared drives.

get_drive_file_contentA

Retrieves the content of a specific Google Drive file by ID, supporting files in shared drives.

• Native Google Docs, Sheets, Slides → exported as text / CSV. • Office files (.docx, .xlsx, .pptx) → unzipped & parsed with std-lib to extract readable text. • PDFs → text extracted with pypdf when possible; scanned/image-only PDFs fall back to a download hint. • Images → returned as base64 with MIME metadata for multimodal clients. • Any other file → downloaded; tries UTF-8 decode, else notes binary.

get_drive_file_download_urlA

Downloads a Google Drive file and saves it to local disk.

In stdio mode, returns the local file path for direct access. In HTTP mode, returns a temporary download URL (valid for 1 hour).

For Google native files (Docs, Sheets, Slides), exports to a useful format:

  • Google Docs -> PDF (default) or DOCX if export_format='docx'

  • Google Sheets -> XLSX (default), PDF if export_format='pdf', or CSV if export_format='csv'

  • Google Slides -> PDF (default) or PPTX if export_format='pptx'

For other files, downloads the original file format.

list_drive_itemsA

Lists files/folders or shared drive containers, supporting shared drives. If drive_id is specified, lists items within that shared drive. folder_id is then relative to that drive (or use drive_id as folder_id for root). If drive_id is not specified, lists items from user's "My Drive" and accessible shared drives (if include_items_from_all_drives is True). Set resource_type to "shared_drives" to list shared drive containers instead of folder contents.

create_drive_folderA

Creates a new folder in Google Drive, supporting creation within shared drives.

create_drive_fileA

Creates a new file in Google Drive, supporting creation within shared drives. Accepts either direct content or a fileUrl to fetch the content from.

import_to_google_docA

Imports a file (Markdown, DOCX, TXT, HTML, RTF, ODT) into Google Docs format with automatic conversion.

Google Drive automatically converts the source file to native Google Docs format, preserving formatting like headings, lists, bold, italic, etc. For batch operations, prefer file_path for files on disk so callers do not need to load full file contents into their context.

import_to_google_slidesA

Imports a presentation (PPTX, PPT, ODP) into Google Slides format with automatic conversion.

Google Drive automatically converts the source presentation to native Google Slides format, preserving slides, layouts, text, and images. For batch operations, prefer file_path for files on disk so callers do not need to load full file contents into their context.

import_to_google_sheetsA

Imports a spreadsheet (XLSX, XLS, ODS, CSV, TSV) into Google Sheets format with automatic conversion.

Google Drive automatically converts the source spreadsheet to native Google Sheets format, preserving rows, columns, sheets, and values. For batch operations, prefer file_path for files on disk so callers do not need to load full file contents into their context.

get_drive_file_permissionsA

Gets detailed metadata about a Google Drive file including sharing permissions, parent folder IDs, ownership, and lifecycle timestamps.

check_drive_file_public_accessA

Searches for a file by name and checks if it has public link sharing enabled.

update_drive_fileA

Updates metadata, properties, and/or content of a Google Drive file.

Providing one of content, file_path, or file_url replaces the file's content in place. The source is uploaded with its source MIME type so the Drive API applies the same format conversion as import_to_google_doc (markdown headings, tables, bold, etc.) while preserving the existing file ID, sharing, comments, and links. Metadata and content can be updated in a single call.

get_drive_shareable_linkA

Gets the shareable link for a Google Drive file or folder.

manage_drive_accessA

Consolidated tool for managing Google Drive file and folder access permissions.

Supports granting, batch-granting, updating, revoking permissions, and transferring file ownership -- all through a single entry point.

copy_drive_fileA

Creates a copy of an existing Google Drive file.

This tool copies the template document to a new location with an optional new name. The copy maintains all formatting and content from the original file.

set_drive_file_permissionsA

Sets file-level sharing settings and controls link sharing for a Google Drive file or folder.

This is a high-level tool for the most common permission changes. Use this to toggle "anyone with the link" access or configure file-level sharing behavior. For managing individual user/group permissions, use share_drive_file or update_drive_permission instead.

list_calendarsA

Retrieves a list of calendars accessible to the authenticated user.

get_eventsA

Retrieves events from a specified Google Calendar. Can retrieve a single event by ID or multiple events within a time range. You can also search for events by keyword by supplying the optional "query" param.

manage_eventB

Manages calendar events. Supports creating, updating, deleting, and RSVP.

manage_out_of_officeA

Manages Out of Office events on Google Calendar. These special events auto-decline meeting invitations and set the user's status to "Out of office" across Google Workspace.

manage_focus_timeA

Manages Focus Time events on Google Calendar. These special events auto-decline meeting invitations and, by default, set the user's chat status to Do Not Disturb, helping protect blocks of uninterrupted work time.

query_freebusyC

Returns free/busy information for a set of calendars.

create_calendarA

Creates a new secondary Google Calendar.

search_docsC

Searches for Google Docs by name using Drive API (mimeType filter).

Returns: str: A formatted list of Google Docs matching the search query.

get_doc_contentA

Retrieves content of a Google Doc or a Drive file (like .docx) identified by document_id.

  • Native Google Docs: Fetches content via Docs API.

  • Office files (.docx, etc.) stored in Drive: Downloads via Drive API and extracts text.

list_docs_in_folderB

Lists Google Docs within a specific Drive folder.

Returns: str: A formatted list of Google Docs in the specified folder.

create_docA

Creates a new Google Doc and optionally inserts initial content.

After creation, the document body starts at index 1. A new empty doc has total length 2 (one section break at index 0, one newline at index 1).

To build a rich document after creation, use batch_update_doc with insert_text operations using end_of_segment=true to append content sequentially without calculating indices. Then call inspect_doc_structure to get exact positions before applying formatting in a separate batch call.

modify_doc_textA

Modifies text in a Google Doc - can insert/replace text and/or apply formatting in a single operation.

TIP: To append text to the end of the document without calculating indices, set end_of_segment=true. This avoids index calculation errors.

For ordinary header/footer text, prefer update_doc_headers_footers. Only pass segment_id when you already have a real header/footer/footnote segment ID from inspect_doc_structure output. Do not guess IDs such as "kix.header" or "kix.footer".

find_and_replace_docA

Finds and replaces text throughout a Google Doc. No index calculation required.

This is the safest way to update specific text in a document because it does not require knowing any indices. Use this tool when you need to:

  • Replace placeholder text (e.g., {{TITLE}}) with real content

  • Update specific words or phrases throughout the document

  • Make targeted text changes without risk of index errors

For building documents from scratch, consider inserting text with unique placeholders via batch_update_doc, then using this tool to replace them.

insert_doc_elementsA

Inserts structural elements like tables, lists, or page breaks into a Google Doc.

insert_doc_imageA

Inserts an image into a Google Doc from Drive or a URL.

update_doc_headers_footersA

Safely creates or updates header/footer text in a Google Doc.

This is the default tool for header/footer content. Do NOT use batch_update_doc with create_header_footer just to set header/footer text; that low-level operation is only for advanced section-break workflows and can fail when the default header/footer already exists.

This tool handles both creation and update in one call:

  • If the header/footer does not exist, it is automatically created first.

  • If the header/footer already exists, its content is replaced.

You do NOT need to create a header/footer separately before calling this tool. Simply call it with the desired content and it will work whether the header/footer exists or not.

batch_update_docA

Executes multiple low-level document operations in a single atomic batch update.

For normal header/footer text, prefer update_doc_headers_footers. Only use create_header_footer here for advanced section-break layouts.

RECOMMENDED WORKFLOW FOR BUILDING DOCUMENTS:

To avoid index calculation errors, build documents in phases:

PHASE 1 - INSERT ALL CONTENT (use end_of_segment=true, no index math): Append text, section breaks, and page breaks sequentially. Each operation appends to the end of the body. No index needed. Example batch: [ {"type": "insert_text", "end_of_segment": true, "text": "Report Title\n"}, {"type": "insert_text", "end_of_segment": true, "text": "\nExecutive Summary\n"}, {"type": "insert_text", "end_of_segment": true, "text": "Revenue grew 15%.\n"}, {"type": "insert_section_break", "end_of_segment": true, "section_type": "NEXT_PAGE"}, {"type": "insert_text", "end_of_segment": true, "text": "Detailed Analysis\n"} ]

PHASE 2 - CREATE HEADERS/FOOTERS (if needed): For normal header/footer text, use update_doc_headers_footers (it auto-creates if missing and writes the content for you). Only include create_header_footer operations in a batch when you are intentionally managing advanced section-break-specific layouts.

inspect_doc_structureA

Essential tool for finding safe insertion points and understanding document structure.

USE THIS FOR:

  • Finding the correct index for table insertion

  • Understanding document layout before making changes

  • Locating existing tables and their positions

  • Getting document statistics and complexity info

  • Inspecting structure of specific tabs

CRITICAL FOR TABLE OPERATIONS: ALWAYS call this BEFORE creating tables to get a safe insertion index.

WHAT THE OUTPUT SHOWS:

  • total_elements: Number of document elements

  • total_length: Maximum safe index for insertion

  • tables: Number of existing tables

  • table_details: Position and dimensions of each table

  • headers / footers: Real segment IDs and previews for header/footer editing

  • tabs: List of available tabs in the document (if no tab_id specified)

WORKFLOW FOR TABLE INSERTION: Step 1: Call this function Step 2: Note the "total_length" value Step 3: Use an index < total_length for table insertion Step 4: Create your table

FORMATTING WORKFLOW: After inserting all text via batch_update_doc with end_of_segment=true, call this tool with detailed=true to get exact start_index and end_index for every paragraph. Use those indices directly in format_text and update_paragraph_style operations in a second batch_update_doc call.

HEADER/FOOTER WORKFLOW: For ordinary header/footer text, use update_doc_headers_footers. If you need low-level segment editing, call this tool first and use the real segment_id values returned under headers/footers. Do not invent IDs.

The detailed output includes elements[].start_index and elements[].end_index with text_preview for each paragraph, making it easy to identify which ranges to format.

debug_docs_runtime_infoA

Return runtime/source information for diagnosing stale MCP server instances.

This is a temporary diagnostic tool intended to verify which code checkout the running MCP server has loaded.

create_table_with_dataA

Creates a table and populates it with data in one reliable operation.

CRITICAL: YOU MUST CALL inspect_doc_structure FIRST TO GET THE INDEX!

MANDATORY WORKFLOW - DO THESE STEPS IN ORDER:

Step 1: ALWAYS call inspect_doc_structure first Step 2: Use the 'total_length' value from inspect_doc_structure as your index Step 3: Format data as 2D list: [["col1", "col2"], ["row1col1", "row1col2"]] Step 4: Call this function with the correct index and data

EXAMPLE DATA FORMAT: table_data = [ ["Header1", "Header2", "Header3"], # Row 0 - headers ["Data1", "Data2", "Data3"], # Row 1 - first data row ["Data4", "Data5", "Data6"] # Row 2 - second data row ]

CRITICAL INDEX REQUIREMENTS:

  • NEVER use index values like 1, 2, 10 without calling inspect_doc_structure first

  • ALWAYS get index from inspect_doc_structure 'total_length' field

  • Index must be a valid insertion point in the document

DATA FORMAT REQUIREMENTS:

  • Must be 2D list of strings only

  • Each inner list = one table row

  • All rows MUST have same number of columns

  • Use empty strings "" for empty cells, never None

  • Use debug_table_structure after creation to verify results

debug_table_structureA

ESSENTIAL DEBUGGING TOOL - Use this whenever tables don't work as expected.

USE THIS IMMEDIATELY WHEN:

  • Table population put data in wrong cells

  • You get "table not found" errors

  • Data appears concatenated in first cell

  • Need to understand existing table structure

  • Planning to use populate_existing_table

WHAT THIS SHOWS YOU:

  • Exact table dimensions (rows × columns)

  • Each cell's position coordinates (row,col)

  • Current content in each cell

  • Insertion indices for each cell

  • Table boundaries and ranges

HOW TO READ THE OUTPUT:

  • "dimensions": "2x3" = 2 rows, 3 columns

  • "position": "(0,0)" = first row, first column

  • "current_content": What's actually in each cell right now

  • "insertion_index": Where new text would be inserted in that cell

WORKFLOW INTEGRATION:

  1. After creating table → Use this to verify structure

  2. Before populating → Use this to plan your data format

  3. After population fails → Use this to see what went wrong

  4. When debugging → Compare your data array to actual table structure

export_doc_to_pdfA

Exports a Google Doc to PDF format and saves it to Google Drive.

update_paragraph_styleA

Apply paragraph-level formatting, heading styles, and/or list formatting to a range in a Google Doc.

This tool can apply named heading styles (H1-H6) for semantic document structure, create bulleted or numbered lists with nested indentation, and customize paragraph properties like alignment, spacing, and indentation. All operations can be applied in a single call.

get_doc_as_markdownA

Reads a Google Doc and returns it as clean Markdown with optional comment context.

Unlike get_doc_content which returns plain text, this tool preserves document formatting as Markdown: headings, bold/italic/strikethrough, links, code spans, ordered/unordered lists with nesting, and tables.

When comments are included (the default), each comment's anchor text — the specific text the comment was attached to — is preserved, giving full context for the discussion.

manage_doc_tabB

Manage document tabs: create, rename, delete, or populate from Markdown.

list_document_commentsA

List all comments from a Google Document.

manage_document_commentA

Manage comments on a Google Document.

Actions:

  • create: Create a new document-level comment. Requires comment_content. Note: The Drive API cannot anchor comments to specific text; only the Google Docs UI can do that.

  • reply: Reply to a comment. Requires comment_id and comment_content.

  • resolve: Resolve a comment. Requires comment_id.

list_spreadsheetsA

Lists spreadsheets from Google Drive that the user has access to.

get_spreadsheet_infoA

Gets information about a specific spreadsheet including its sheets.

read_sheet_valuesA

Reads values from a specific range in a Google Sheet.

modify_sheet_valuesB

Modifies values in a specific range of a Google Sheet - can write, update, or clear values.

format_sheet_rangeA

Applies formatting to a range: colors, number formats, text wrapping, alignment, and text styling.

Colors accept hex strings (#RRGGBB). Number formats follow Sheets types (e.g., NUMBER, CURRENCY, DATE, PERCENT). If no sheet name is provided, the first sheet is used.

manage_conditional_formattingC

Manages conditional formatting rules on a Google Sheet. Supports adding, updating, and deleting conditional formatting rules via a single tool.

create_spreadsheetB

Creates a new Google Spreadsheet.

create_sheetB

Creates a new sheet or duplicates an existing sheet (user_google_email: str, spreadsheet_id: str, sheet_name: Optional[str] = None, source_sheet_name: Optional[str] = None, insert_sheet_index: Optional[int] = None).

list_sheet_tablesA

Lists all structured tables in a spreadsheet with their IDs, names, ranges, and column details. Use this to find table IDs for append_table_rows.

append_table_rowsA

Appends rows to a structured table in a Google Sheet. The rows are added to the end of the table body, automatically extending the table range.

Use list_sheet_tables first to find the table ID.

resize_sheet_dimensionsA

Manages sheet-level dimension properties: resize columns/rows, auto-resize to fit content, freeze rows/columns, hide/unhide rows/columns, and insert/delete rows/columns.

move_sheet_rowsA

Moves rows from one sheet to another within the same spreadsheet. The move is performed in a single batchUpdate (copyPaste followed by deleteDimension). Note: batchUpdate executes requests sequentially but does not roll back on partial failure — if the copy succeeds but the delete fails, rows may be duplicated. Formulas, data types, and formatting are preserved (unlike a values.get/append round-trip). Row numbers are 1-based (matching the spreadsheet UI).

list_spreadsheet_commentsC

List all comments from a Google Spreadsheet.

manage_spreadsheet_commentA

Manage comments on a Google Spreadsheet.

Actions:

  • create: Create a new comment. Requires comment_content. Note: The Drive API cannot anchor comments to arbitrary text; Sheets comments are cell-scoped via the API.

  • reply: Reply to a comment. Requires comment_id and comment_content.

  • resolve: Resolve a comment. Requires comment_id.

list_spacesB

Lists Google Chat spaces (rooms and direct messages) accessible to the user.

Returns: str: A formatted list of Google Chat spaces accessible to the user.

get_messagesC

Retrieves messages from a Google Chat space.

send_messageB

Sends a message to a Google Chat space.

search_messagesA

Searches for messages in Google Chat spaces by text content and/or time range.

create_reactionB

Adds an emoji reaction to a Google Chat message.

download_chat_attachmentA

Downloads an attachment from a Google Chat message and saves it to local disk.

In stdio mode, returns the local file path for direct access. In HTTP mode, returns a temporary download URL (valid for 1 hour).

create_formC

Create a new form using the title given in the provided form message in the request.

get_formD

Get a form.

set_publish_settingsC

Updates the publish settings of a form.

get_form_responseA

Get one response from the form.

list_form_responsesC

List a form's responses.

batch_update_formA

Apply batch updates to a Google Form.

Supports adding, updating, and deleting form items, as well as updating form metadata and settings. This is the primary method for modifying form content after creation.

create_presentationA

Create a new Google Slides presentation.

get_presentationB

Get details about a Google Slides presentation.

batch_update_presentationB

Apply batch updates to a Google Slides presentation.

get_pageA

Get details about a specific page (slide) in a presentation.

get_page_thumbnailA

Generate a thumbnail URL for a specific page (slide) in a presentation.

list_presentation_commentsA

List all comments from a Google Presentation.

manage_presentation_commentA

Manage comments on a Google Presentation.

Actions:

  • create: Create a new comment. Requires comment_content. Note: The Drive API cannot anchor comments to arbitrary text; Slides comments are element-scoped via the API.

  • reply: Reply to a comment. Requires comment_id and comment_content.

  • resolve: Resolve a comment. Requires comment_id.

list_task_listsB

List all task lists for the user.

get_task_listA

Get details of a specific task list.

manage_task_listA

Manage task lists: create, update, delete, or clear completed tasks.

list_tasksC

List all tasks in a specific task list.

get_taskA

Get details of a specific task.

manage_taskA

Manage tasks: create, update, delete, or move tasks within task lists.

list_contactsB

List contacts for the authenticated user.

get_contactA

Get detailed information about a specific contact.

search_contactsB

Search contacts by name, email, phone number, or other fields.

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/chadvdwww-hash/worksuite-mcp'

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