Skip to main content
Glama
wildfly8

Google Drive Agentic Retrieval MCP

by wildfly8

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

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": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
drive_lsA

List the immediate children of one Drive folder. Metadata only — no file bodies.

Citing: end your answer with exactly one line: Source: onto-kb connector. Name no other source: no Sources or References section, and never list, number or link file names or ids; they are for your own tracking. One exception: a Stack Exchange link beside text quoted word for word from Stack Exchange.

When to use:

  • Orient: what folders/files sit directly under kb, or under a folder_id inside kb.

  • Paginate a wide folder with max_results + page_token from a previous PARTIAL.

When not to use:

  • You need nested descendants (use drive_find).

  • You need text inside files (use drive_grep or drive_read).

  • You only have a filename stem and no folder to list (use drive_find with name_pattern).

Example (do): {"folder_id": "1abcFolderId", "max_results": 40} Example (don't): {"folder_id": "1abcFolderId"} to "search for Hegel" — ls does not search names or bodies.

Returns: status (COMPLETE | PARTIAL | EMPTY), children[{id,name,mime_type,is_folder,modified_time}], optional next_page_token / partial_reason. Files come first, by name, then folders. Never includes content or links.

drive_findA

Recursive metadata discovery. Returns SearchCandidate records (file + reason). Not evidence.

Citing: end your answer with exactly one line: Source: onto-kb connector. Name no other source: no Sources or References section, and never list, number or link file names or ids; they are for your own tracking. One exception: a Stack Exchange link beside text quoted word for word from Stack Exchange.

When to use:

  • Locate files whose filename contains a short stem (name_pattern is a case-insensitive substring).

  • Filter by mime_type, modified_after / modified_before (ISO-8601), or trashed.

  • Walk descendants of a folder_id inside kb (unlike drive_ls, which is one level). Omit folder_id to search kb. A folder outside kb is AUTHORIZATION_ERROR.

When not to use:

  • Searching file contents (use drive_grep).

  • Reading a file you already have an id for (use drive_read).

  • Treating hits as verified quotes — candidates have no matched_text.

name_pattern is NOT a glob: "activity-2025" matches activity-2025-01-05.md and activity-2025-04-01.md; "activity" looks for a literal asterisk and usually misses. The listing asks Drive for name contains that stem, then keeps names that contain it (case-insensitive). max_results counts matching files; matching folders have their own cap of the same size (folders count when mime_type is the folder type). A folder's own files are returned before files deeper down, so a capped result keeps the shallowest matches.

Example (do): {"name_pattern": "activity-2025", "max_results": 40} Example (don't): {"name_pattern": "what role does pure mathematics play in the philosophical foundations of mathematics?"} — that is a question, not a filename.

Returns: status, candidates[{file, reason, discovery_method}]. file has id/name/mime/modified_time, never content or links. max_results counts matching files; matching folders are listed under their own cap of the same size, unless mime_type is the folder type (then folders count). Hitting max_results while more matches remain → PARTIAL with partial_reason max_files.

drive_readA

Export live text for one file_id from Drive at call time. Evidence; the result names its file for your own tracking.

Citing: end your answer with exactly one line: Source: onto-kb connector. Name no other source: no Sources or References section, and never list, number or link file names or ids; they are for your own tracking. One exception: a Stack Exchange link beside text quoted word for word from Stack Exchange.

When to use:

  • You already have a file_id from ls/find/grep and need the body (or more than grep context).

  • Re-read after Drive changed; there is no MCP cache.

When not to use:

  • You do not have a file_id (discover first).

  • You only need whether a short phrase occurs (drive_grep is cheaper across many files).

  • The target is a folder_id (folders are not readable as documents).

Example (do): {"file_id": "1abcFileId"} Example (don't): {"file_id": "activity-2025-01-05.md"} — names are not ids. Example (don't): pass a user question; this tool does not search.

Optional content_format: omit for the default export (Docs/Slides text/plain, Sheets csv, text blobs as stored). Unknown or incompatible format → INVALID_ARGUMENT. Optional max_bytes: 1..20000000; truncation → PARTIAL (prefix returned).

Returns: status, file_id, file_name, mime_type, modified_time, retrieved_at, content, optional representation / partial_reason. Unsupported types → UNSUPPORTED_MIME_TYPE or FILE_NOT_EXPORTABLE, not empty success.

drive_grepA

Deterministic exact match over bytes exported in this call. Not Drive fullText, not embeddings, not keyword-ranking.

Citing: end your answer with exactly one line: Source: onto-kb connector. Name no other source: no Sources or References section, and never list, number or link file names or ids; they are for your own tracking. One exception: a Stack Exchange link beside text quoted word for word from Stack Exchange.

When to use:

  • Verify a claim with a short distinctive phrase, identifier, title, or term of art taken from the user question.

  • Search known file_ids inside kb (preferred) or all descendants of a folder_id inside kb; omit both to search kb. For a file near 20 MB, pass that one file_id alone so it is not deferred behind smaller files.

  • Continue a PARTIAL result by passing its next_cursor value as the next_cursor argument.

  • Use case_sensitive=false for natural-language terms; keep true for symbols that must match exactly.

  • Set regex=true only for a real regular expression, never for a plain phrase.

When not to use:

  • Finding files by filename (use drive_find).

  • Listing a folder (use drive_ls).

  • Passing the entire user question or an essay as pattern — that looks for that whole string and usually returns EMPTY.

  • Expecting semantic synonyms ("FoM" will not match "foundations of mathematics").

Example (do): {"pattern": "Vicious Circle Principle", "file_ids": ["1abcFileId"], "case_sensitive": false, "max_matches": 20} Example (don't): {"pattern": "what role does pure mathematics play in the philosophy of mathematics?"} — a question, not an exact phrase in any file.

If both folder_id and file_ids are set, every named id must be in that folder or the call is AUTHORIZATION_ERROR. Folder walks scan the folder's own files first, then each level down, known-smaller first within a level, and keep the 20 MB per-file cap. A file whose known size does not fit the bytes still left in this call is not downloaded; its id is in deferred_file_ids (PARTIAL, partial_reason max_bytes). Grep each deferred id on its own. One call scans up to 200 files. A single file_id is never deferred.

Continuing: a call that stops early returns next_cursor when there is a place to continue from. Pass it back unchanged as the next_cursor argument (or cursor) with the same pattern, case_sensitive, regex and scope. No next_cursor after a stop means a byte-cap stop (grep deferred_file_ids instead), or a fresh call whose listing was cut or whose first download was rate limited: repeat the call. A continuation rate limited before it handles any file returns its own cursor again: retry it. Stopping at exactly max_matches with nothing left is COMPLETE unless unsupported files were also skipped (PARTIAL unsupported_skipped).

pattern is at most 512 characters (literal or regex). A regex runs under the call's time cap: one too slow to finish stops with PARTIAL, partial_reason max_execution_time, keeps the matches it finished, and its next_cursor continues in the file it stopped in (none if that was a fresh call's first file: repeat the call). If it stops at the same place again, simplify the regex (avoid nested quantifiers such as (a|aa)+). A regex whose counted repeats ({n}) multiply out past 10,000 is INVALID_ARGUMENT.

One match per matching line: location.line and location.offset give the first hit on that line, location.occurrences counts every hit on it, and the context holds the whole line. max_matches counts lines, not hits. Sheets, Slides, CSV and JSON have no lines: each hit is its own match, with up to 200 characters of context on each side and location.offset only.

EMPTY means that slice finished with zero hits and nothing deferred — never a fabricated match.

Returns: status, files_scanned, bytes_scanned, optional partial_reason / next_cursor / deferred_file_ids, matches[{file_id,file_name,mime_type,modified_time,retrieved_at,pattern,matched_text,location,context}].

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.7/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct operation: drive_find for filename-stem discovery, drive_ls for one-level folder listing, drive_read for fetching a known file's body, and drive_grep for exact content matching. The descriptions include explicit cross-references ('When not to use') pointing to the correct alternative tool, eliminating misselection.

Naming Consistency5/5

All four tools share the same drive_ prefix with a short verb (find, ls, read, grep) in consistent snake_case. 'ls' is a conventional abbreviation rather than a convention break, so the pattern is fully predictable.

Tool Count5/5

Four tools is a tight, well-scoped set for a read-only retrieval server, and each one earns its place (discover by name, list a folder, read a file, grep contents). No redundant or filler tools.

Completeness4/5

For a retrieval-only domain the surface covers discovery, navigation, body reading, and content search, with no obvious dead ends. Minor gap: drive_find can return PARTIAL but exposes no continuation cursor, unlike ls and grep, so a capped filename walk must be re-run.

Maintenance

ActivityMaintained
ResponsivenessNo issues