Skip to main content
Glama
dipseth

google-workspace-unlimited

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_LEVELNoLogging level (DEBUG, INFO, WARNING, ERROR)INFO
QDRANT_KEYNoQdrant API key (use NONE for no auth)NONE
QDRANT_URLNoQdrant vector database URLhttp://localhost:6333
SERVER_HOSTNoServer bind addresslocalhost
SERVER_PORTNoServer port8002
ENABLE_HTTPSNoEnable HTTPS/SSLfalse
SSL_KEY_FILENoPath to SSL private key (Required if ENABLE_HTTPS is true)
FASTMCP_CLOUDNoEnable cloud deployment modefalse
MCP_TRANSPORTNoCommunication protocol (stdio or http). Glama's mcp-proxy expects stdio.stdio
MINIMAL_TOOLSNoSkip heavy module-wrapper indexing at startup (818-component email types, card_framework widgets). Set to 'true' for fast cold-start in environments with strict startup timeouts (Glama sandbox, CI smoke tests).false
SSL_CERT_FILENoPath to SSL certificate (Required if ENABLE_HTTPS is true)
SAMPLING_TOOLSNoEnable sampling middleware tools (validation agents). Requires VENICE_INFERENCE_KEY, LITELLM_API_KEY, or ANTHROPIC_API_KEY.false
CREDENTIALS_DIRNoDirectory for stored credentials./credentials
ENABLE_CODE_MODENoEnable Code Mode (sandboxed Python tool-call chaining via the `execute` meta-tool)false
GMAIL_ALLOW_LISTNoComma-separated allowed email addresses
GOOGLE_CLIENT_IDNoOAuth 2.0 client ID from Google Cloud Console
OAUTH_REDIRECT_URINoMust match Google Console exactlyhttp://localhost:8002/oauth2callback
QDRANT_AUTO_LAUNCHNoAutomatically launch Qdrant via Docker if not reachable. Set to 'false' in single-container environments where Docker-in-Docker isn't available (Glama sandbox).true
SESSION_SECRET_KEYNoSecret key for session management
ATTACHMENT_TEMP_DIRNoTemp directory for outbound attachment downloads (Gmail signed-URL serving)/tmp/gw-mcp-attachments
ENABLE_AUDIT_LOGGINGNoEnable security event tracking
GOOGLE_CLIENT_SECRETNoOAuth 2.0 client secret from Google Cloud Console
DRIVE_UPLOAD_TEMP_DIRNoTemp directory for staged client→server uploads (only used when DRIVE_UPLOAD_CLIENT_FS=true)/tmp/gw-mcp-drive-uploads
DRIVE_UPLOAD_CLIENT_FSNoTreat upload_to_drive 'path' as the client's filesystem and orchestrate client→server→Drive transport via signed PUT URL. Set to 'true' on remote/hosted deployments where client and server are on different machines.false
CREDENTIAL_STORAGE_MODENoCredential storage mode (FILE_ENCRYPTED, FILE_PLAINTEXT, MEMORY_ONLY)FILE_ENCRYPTED
SESSION_TIMEOUT_MINUTESNoSession idle timeout in minutes60
DRIVE_UPLOAD_MAX_SIZE_MBNoMaximum size in MB for staged client→server uploads (only used when DRIVE_UPLOAD_CLIENT_FS=true)100
DRIVE_UPLOAD_TTL_SECONDSNoTTL in seconds for staged client→server upload URLs (one-time-use)900
GOOGLE_CLIENT_SECRETS_FILENoAlternative: path to OAuth JSON file

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tasks
{
  "list": {},
  "cancel": {},
  "requests": {
    "tools": {
      "call": {}
    },
    "prompts": {
      "get": {}
    },
    "resources": {
      "read": {}
    }
  }
}
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
tagsA

List this server's tool tags (service areas like gmail, drive, docs, photos) with tool counts. Use when: browsing what capability areas exist before a targeted lookup. For keyword lookup use search; for parameters of known tools use get_schema. Returns: '- tag (N tools)' lines at detail='brief' (default), or every tool listed under each tag at detail='full'.

searchA

Find this server's Google Workspace tools by keyword (BM25 over names, descriptions, and tags). Use when: you don't know the exact tool name yet. To browse by category use tags; once you have names, use get_schema for parameters, then execute to call them. To search past results rather than tools, use semantic_search. Returns: matching tools as names + descriptions ('brief', default), parameter markdown ('detailed'), or complete JSON definitions ('full'). An empty result means no keyword match — retry with different terms.

get_schemaA

Get parameter schemas for named tools before calling them via execute. Use when: you already have tool names (from search or tags) and need exact parameters. Not for discovery — use search for that. Returns: per-tool parameter markdown ('detailed', default), names + descriptions ('brief'), or full JSON schemas ('full'); unknown names are reported under 'Tools not found'.

semantic_searchA

Search the Qdrant vector store of this server's past tool responses and card templates.

Use when: looking up previous results, usage history, or analytics ('service:gmail last week', 'tool:search recent', 'overview'). For discovering tools to call, use search; to preview one stored document, pass its point ID to fetch_document.

Modes: semantic text similarity; service/tool history queries; analytics ('overview', 'usage stats'); filter_dsl for structured filters; positive/negative point IDs for recommendation; query_dsl for fusion/discover/order-by; prefetch_dsl for multi-stage retrieval.

Behavior: read-only against the local Qdrant instance; no Google APIs are called. Returns: scored rows 'score service/tool timestamp id:'. Errors: 'Search failed' when Qdrant is unreachable; 'No results' when nothing clears score_threshold (default 0.3 — lower it to widen the net).

DSL filter symbols: D_5=DatetimeRange, ʄ=FieldCondition, ƒ=Filter, F_6=FilterSelector, ℏ=HasIdCondition, I_2=IsEmptyCondition, I_0=IsNullCondition, ɱ=MatchAny, ṁ=MatchText, M_0=MatchTextAny, ☆=MatchValue, ř=Range Query-DSL symbols: Å=AcornSearchParams, C_14=ContextExamplePair, ¢=ContextPair, C_0=ContextQuery, D_6=DiscoverInput, D_2=DiscoverQuery, D_4=DiscoverRequest, D_21=DiscoverRequestBatch, ℱ=Fusion, φ=FusionQuery, ø=OrderBy, ɵ=OrderByQuery, ¶=Prefetch, ʔ=QuantizationSearchParams, R_12=RecommendGroupsRequest, R_2=RecommendInput, R_4=RecommendQuery, R_5=RecommendRequest, R_18=RecommendRequestBatch, R_10=RecommendStrategy, ♦=SearchParams Example: ƒ{must=[ʄ{key="tool_name", match=☆{value="send_dynamic_card"}}]} MatchAny: ƒ{must=[ʄ{key="tool_name", match=ɱ{any=["tool_a", "tool_b"]}}]}

fetch_documentA

Preview one stored tool response by its Qdrant point ID.

Use when: inspecting a hit returned by semantic_search. To find point IDs in the first place, use semantic_search; for the full untruncated content, call the fetch tool inside an execute block.

Behavior: read-only. Returns: tool name, service, timestamp, user, argument count, and the first 500 characters of stored content. Errors: 'Document not found' for unknown or expired point IDs.

tool_activityA

Show usage analytics for this server's tools: call counts, error rates, last-used times.

Use when: answering 'what has been used or failing lately'. To read an individual response, pass a sample point ID to fetch_document; to discover tools to call, use search instead.

Behavior: read-only aggregation over the Qdrant response store. Returns: a text dashboard grouped by tool_name or user_email, with sample point IDs per group. Errors: 'Analytics failed' when the response store is unreachable.

executeA

Run sandboxed Python that calls this server's Google Workspace tools via await call_tool(tool_name, params), chaining calls in one block. Use when: you know which tools to call. To find tool names first use search or tags; for exact parameters use get_schema; to look up past results instead, use semantic_search. Behavior: each call_tool runs the real tool immediately — sends, edits, and deletes take effect; there is no dry-run. Use return to produce output; prefer returning the final answer from a single block. Only call_tool(tool_name: str, params: dict) -> Any is available in scope. Unknown tool names raise NotFoundError; disallowed syntax raises SandboxError.

SANDBOX RESTRICTIONS — these produce SandboxError, avoid them:

  • sorted_(items, key=lambda x: x['k']) → lambda args fail; use builtins like key=len or sort manually

  • import only covers a small stdlib subset (e.g. json); no third-party modules — prefer the built-in helpers listed below

Built-in helpers (import is not available — use these instead):

  • now(tz_offset=0) → current datetime string (UTC by default)

  • today(tz_offset=0) → current date 'YYYY-MM-DD' (UTC by default)

  • days_ago(n, tz_offset=0) → ISO datetime string N days ago

  • hours_ago(n, tz_offset=0) → ISO datetime string N hours ago

  • format_date(iso_str, fmt='%Y-%m-%d %H:%M') → formatted date

  • parse_date(iso_str) → normalized ISO datetime

  • timestamp() → current unix timestamp (int)

  • to_json(obj, indent=None) → JSON string

  • from_json(s) → parsed object

  • url_encode(s) → URL-encoded string

  • url_decode(s) → URL-decoded string

  • url_join(base, *parts) → joined URL path

  • query_string(params) → URL query string from dict

  • re_find(pattern, text) → list of matches

  • re_match(pattern, text) → bool

  • re_sub(pattern, repl, text) → substituted string

  • truncate(text, n=80) → truncated with '...'

  • dedent(text) → remove common leading whitespace

  • wrap_text(text, width=72) → word-wrap to width

  • pad_left(s, width, char=' ') → right-justify / zero-pad

  • pad_right(s, width, char=' ') → left-justify

  • join(items, sep=', ') → joined string

  • html_escape(s) → HTML-safe string

  • sqrt(n), ceil(n), floor(n) → math

  • round_(n, digits=2), abs_(), min_(), max_(), sum_() → math

  • sorted_(items, key=None, reverse=False) → sorted list

  • unique(items) → deduplicated list (preserves order)

  • flatten(lists) → flat list from nested lists

  • counter(items) → dict of {item: count}

  • chunk(items, size) → list of chunks

  • zip_(*iterables) → zipped as list of lists

  • dict_get(d, 'a.b.c', default=None) → nested dict access

  • md5(s), sha256(s) → hash hex digests

  • gather_tools(calls) → run multiple tool calls sequentially; calls is a list of [tool_name, params] pairs, returns list of results (assign to variable, then index: r = await gather_tools([...]); a, b = r[0], r[1])

  • sleep(seconds) → async sleep

Prompts

Interactive templates invoked by user choice

NameDescription
quick_email_demoSimple: Zero-config Gmail demo with Jinja2 templates and resource integration
structured_tool_showcaseShowcase a specific tool with structured response example (random if tool not specified)
structured_response_comparisonCompare multiple tools showing original vs structured response formats
structured_interactive_demoInteractive challenge featuring a random tool with structured responses
structured_response_benefitsComprehensive overview of structured response system benefits and implementation

Resources

Contextual data attached and managed by the client

NameDescription
manage_tools_dashboardRead-only dashboard showing tool enable/disable state
latest_data_dashboardDashboard for the most recently called list tool
Current User EmailSlim 'most recent authenticated email for this session' — returns email + session_id + authenticated flag. For the full profile (credentials, scopes, etc.) use user://current/profile.
Current User IdentityLightweight active-account identity: email, session, and auth provenance. Optimized for client subscriptions — AuthMiddleware fires notifications/resources/updated for this URI when the active Google account changes between tool calls. For credential details use user://current/profile.
Current User ProfileCanonical current-user resource. Superset of user://current/email + user://current/identity + prior profile: email, session_id, authenticated, auth_provenance, identity_source, linked_accounts, and nested auth_status (credential validity, scopes, expiry). Subscription target.
Current Authentication SessionDetailed information about the current authentication session including token status, expiration times, and granted scopes
Active Authentication SessionsAdministrative view of all active authentication sessions with session details, user information, and expiration status for multi-user session management
Recent Gmail Messages CacheCached list of recent Gmail messages from the last 7 days with sender information, subjects, snippets, and thread IDs - refreshed every 5 minutes for efficient email monitoring
Complete Tools DirectoryComprehensive catalog of all available tools organized by category including Drive, Gmail, Calendar, Chat, Forms, Docs, Sheets, and authentication tools with detailed capability descriptions
Detailed Tools CollectionCurated list of detailed tools that use automatic resource templating - no user_google_email parameters required, seamless authentication through OAuth session context
Gmail Allow ListGet the configured Gmail allow list for send_gmail_message tool - recipients on this list skip elicitation confirmation
All Recent Workspace ItemsGet recent items from all Google Workspace services (Drive, Docs, Sheets, Slides, Forms, Photos) in a unified view.
Available Template MacrosGet all available Jinja2 macros with usage examples. The EnhancedTemplateMiddleware scans middleware/templates/*.j2 files and extracts: - Macro definitions using {% macro name(...) %} - Usage examples from {# MACRO USAGE EXAMPLE: ... #} comments - Template file paths and descriptions Returns comprehensive macro information including: - Macro names and parameters - Template file locations - Ready-to-use usage examples - Discovery timestamps This enables easy discovery and correct usage of available template macros. Example response: { "macros": { "render_gmail_labels_chips": { "name": "render_gmail_labels_chips", "template_file": "email_card.j2", "usage_example": "{{ render_gmail_labels_chips(service://gmail/labels, 'Label summary') }}" } }, "total_count": 5 } This resource is handled by EnhancedTemplateMiddleware.
User Email TemplateSimple template resource that returns just the user email string - the most basic resource for tools that need only the email address
Qdrant Collections ListList all available Qdrant collections with detailed information including point counts, vector statistics, and status
Qdrant Tool Response CacheGet cached tool responses from Qdrant organized by tool name with point metadata including IDs, timestamps, and user emails
Qdrant Middleware StatusCheck the status of Qdrant middleware integration including client availability, initialization state, and resource handler status

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/dipseth/google_workspace_fastmcp2'

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