> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zerodrive.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Hosted remote MCP endpoint: https://api.zerodrive.dev/mcp (OAuth 2.0 PKCE or Bearer token).
> REST API base URL: https://api.zerodrive.dev with OpenAPI 3.1.0 specification at https://api.zerodrive.dev/openapi.json.
> S3-compatible gateway: https://api.zerodrive.dev/s3 (AWS Signature V4, region auto).
> Local command-line tool: zd (or zerodrive) and local stdio MCP server: zerodrive mcp.
> Token prefixes: zdk_ (Personal API Key), zdt_ (device session token), zda_ (OAuth access token), zdr_ (OAuth refresh token), zdx_ (temporary sandbox key). Never paste real keys into prompts or code.
> Be honest about platform boundaries: cloud files require internet access, files are encrypted at rest and in transit by Cloudflare rather than end-to-end encrypted, ZeroDrive is not a replacement for an independent backup, Windows 11 support is an unsigned x64 beta, and the 7-day Pro free trial requires a card and charges automatically when it ends.

# Knowledge Brain, Corpora, Graph & White-Label Tools

> MCP tools for cited vault search, categories, custom collections (corpora), CSV queries, AI chat search, Knowledge Graph, media links, and White-Label Brains.

Available on Hosted MCP (`https://api.zerodrive.dev/mcp`), `zerodrive mcp`, and White-Label Brains (`/brain/<slug>/mcp`).

## Search, categories, and Markdown conversion

| Tool | Inputs | What it does |
| :- | :- | :- |
| `query_vault` | `query`, `preset`, `bucket`, `client_id`, `path`, `mode`, `deep`, `max_sources` | Cited search across PDFs, Office docs, calls, and notes. |
| `search_filenames` | `query`, `path`, `limit` | Fast filename and extension search. |
| `grep_vault` | `query`, `path`, `max_results` | Text grep returning lines and snippets. |
| `glob_files` | `pattern`, `prefix`, `drive_id`, `cursor`, `limit` | Wildcard file matching (`**`, `*`, `?`). |
| `full_text_search` | `query`, `drive_id`, `branch`, `prefix`, `extensions` | Ranked text search on `main` or branches. |
| `query_drive_tables` | `path`, `where`, `group_by`, `aggregations`, `sort` | Filters and sums CSV, JSONL, and JSON tables. |
| `get_brain_overview` | `format` | Shows all 10 categories and client IDs. |
| `update_brain_buckets` | `folder_rules` | Saves folder category rules in `_SYSTEM/brain-buckets.json`. |
| `classify_brain_folders` | `apply`, `include_all` | Suggests folder categories (`apply: true` saves). |
| `convert_to_markdown` | `path`, `save_path` | Converts PDF or Office files (`<= 15 MB`) to Markdown. |
| `reindex_vault_search` | `steps` (1 to 12), `reset` | Checks or nudges background indexing. |

## Custom collections (corpora), Graph, chats, and media

| Tool | Inputs | What it does |
| :- | :- | :- |
| `list_corpora` | `include_starters` | Lists custom collections and starter templates. |
| `create_corpus` | `id`, `template_id`, `name`, `include_paths`, `buckets`, `extensions`, `instructions` | Creates a collection (max 50) and starts indexing. |
| `update_corpus` | `id`, updated fields | Updates collection paths or instructions. |
| `delete_corpus` | `id` | Deletes a collection and its index. |
| `query_corpus` | `corpus_id`, `query`, `max_sources`, `deep`, `mode` | Cited smart search inside one collection. |
| `read_corpus_doc` | `corpus_id`, `path`, `lines`, `head`, `tail` | Reads a doc verified inside that collection. |
| `query_csv_table` | `corpus_id`, `path`, `column`, `op`, `value`, `sort_by`, `aggregate` | Queries CSV/TSV tables inside one collection. |
| `scan_conversations` | `corpus_id`, `query`, `provider`, `limit` | Searches Claude, Codex, and ChatGPT chat logs. |
| `get_brain_graph` | `corpus_id`, `rebuild`, `max_nodes`, `min_edge_weight`, `bucket`, `include_isolated` | Returns topic and file links for Knowledge Graph. |
| `list_media_links` | `corpus_id` | Lists paired recordings and unlinked media. |
| `link_media_transcript` | `media_path`, `transcript_path` | Pairs a recording with its transcript. |
| `suggest_media_links` | `corpus_id`, `limit` | Suggests transcript matches for media files. |

## Agency White-Label Brain tools

Clients on `/brain/<slug>/mcp` get **only these 8 scoped tools**. Edits to `library/` are always blocked.

| Tool | Access | What it does |
| :- | :- | :- |
| `query_vault` | `library/` + `workspace/` | Cited search with `[1]`, `[2]` sources and brain rules. |
| `list_files` | `library/` or `workspace/` | Lists allowed folders and files. |
| `read_file` | `library/` or `workspace/` | Reads playbooks or client workspace files. |
| `write_file` | `workspace/` only | Creates or updates workspace files. |
| `edit_file` | `workspace/` only | Edits workspace text cleanly. |
| `delete_file` | `workspace/` only | Deletes a client workspace file. |
| `convert_to_markdown` | Saves to `workspace/` only | Converts PDF or Office files (`<= 15 MB`) to Markdown. |
| `reindex_brain` | Client index only | Indexes newly added workspace files. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.