Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOREDOCS_ROOTNoOverride the root directory for LoreDocs data (default ~/.loredocs)

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
vault_createA

Create a new knowledge vault for organizing project documents.

A vault is a container for related documents -- like a project folder with superpowers (search, tags, versioning). You can link a vault to one or more Claude Projects, but vaults are independent and can serve multiple projects.

Returns the new vault's ID and metadata.

vault_listA

List all knowledge vaults with summary stats (document count, total size, last modified).

Use this to see what vaults exist and find the one you need.

vault_infoB

Get detailed information about a vault, including its full document manifest.

Accepts either a vault ID or vault name.

vault_archiveA

Archive a vault (soft delete). Archived vaults are hidden from vault_list by default but can be restored.

vault_deleteA

Permanently delete a vault and ALL its documents. This cannot be undone.

You must set confirm=true to proceed. Consider using vault_archive instead.

loredocs_onboardA

Set up or update your LoreDocs workspace configuration.

Call once after installing LoreDocs to get a recommended vault structure. Call again to add new domains or agents -- existing data is never modified.

Creates:

  • A Config vault with a 'My LoreDocs Setup' reference doc (tagged authoritative)

  • One vault per domain in domains

  • One '[Name] Reports' vault per agent in agents

  • The reference doc is queryable: vault_search('my setup')

Args: name: Workspace or team name domains: Work areas, each becomes a vault (e.g. ['finance', 'research']) agents: Agent names, each gets a '[Name] Reports' vault tag_style: 'simple' (default) or 'detailed'

Vault tags: freeform strings on documents for cross-vault retrieval. Categories: reference, report, template, config, archive, general. Priority: authoritative, normal, draft, outdated.

vault_link_projectA

Associate a Claude Project name with a vault.

This is metadata for your organization -- it records which Claude Projects use knowledge from this vault. A vault can be linked to multiple projects.

vault_open_workspaceA

Open (or create) a vault scoped to a workspace directory.

If a vault is already linked to this directory path, returns it. Otherwise, creates a new vault named after the directory and records the workspace_path so future calls return the same vault.

This mirrors how MemClaw scopes memory to workspaces -- lower friction than naming vaults manually. Named vaults remain available for users who prefer explicit management.

vault_add_docA

Add a text document to a vault with metadata (tags, category, priority, notes).

The document will be full-text indexed for search and stored with version tracking. Content can be provided inline (content parameter) or from a file path (path parameter). For binary files (PDF, DOCX, etc.), use vault_import_dir to import from a directory.

vault_update_docA

Update a document's content or metadata.

If content changes, the previous version is saved automatically in the version history. You can restore old versions with vault_doc_restore.

vault_remove_docA

Soft-delete a document. The document is hidden but can be recovered.

For permanent deletion, use vault_delete to remove the entire vault.

vault_get_docA

Retrieve a document's metadata and optionally its text content.

Use include_content=false to get just the metadata without loading the full text.

vault_list_docsA

List documents in a vault with sorting and filtering options.

Supports sorting by name, date, size, or category. Filter by category or tag to narrow results.

vault_searchA

Full-text or semantic search across document contents.

Default (semantic=False): SQLite FTS5 keyword search. Supports FTS5 syntax:

  • Simple words: depreciation schedule

  • Phrases: "rental income"

  • Boolean: depreciation AND schedule

  • Negation: rental NOT commercial

  • Prefix: deprec*

Semantic (semantic=True, Pro only): hybrid vector + BM25 search via LanceDB. Finds documents by meaning even when exact keywords differ. Requires LoreDocs Pro and pip install loredocs[pro]. Falls back to FTS5 if the semantic index has not been built yet (run vault_rebuild_index first).

vault_rebuild_indexA

Rebuild the LanceDB semantic search index from all stored documents. Pro only.

Run this after first installing the Pro deps (pip install loredocs[pro]) or after restoring from backup. The index is kept in sync automatically for new documents added after install, but existing documents require a one-time rebuild to become searchable semantically.

vault_search_by_tagA

Find all documents with a specific tag, across one vault or all vaults.

vault_tag_docA

Add or remove tags on a document.

You can add and remove tags in a single operation. Tags are case-sensitive strings. Duplicates are automatically removed.

vault_bulk_tagA

Apply tag changes to multiple documents at once.

Useful for organizing a batch of documents after import or reclassification.

vault_categorizeA

Set a document's category (general, reference, config, report, template, archive, imported).

vault_set_priorityA

Mark a document's priority/status: authoritative, normal, draft, or outdated.

'authoritative' means this document is the source of truth. 'outdated' flags the document as no longer current.

vault_add_noteA

Attach a contextual note to a document.

Notes help you and your AI assistant understand when/how to use this document.

vault_doc_historyA

View the version history for a document.

Every time a document's content is updated, the previous version is saved automatically. Use vault_doc_restore to revert to an earlier version.

vault_doc_restoreA

Restore a document to a previous version.

The current version is saved to history first, then the specified version becomes the new current version.

vault_copy_docA

Copy a document from one vault to another, including all metadata.

vault_move_docA

Move a document to a different vault. Removes it from the source vault.

vault_injectA

Load ranked vault documents into conversation context with token-budget enforcement.

Documents are ranked by FTS5 relevance (when query is provided) and priority weight, then packed greedily until the effective token cap is reached.

Args: vault_name: Vault name or ID. query: Optional FTS5 search query to rank documents by relevance. max_tokens: Hard token budget. Overrides vault DB cap. Effective cap = max_tokens * safety_factor. cap_behavior: 'best_effort' (inject as many docs as fit) or 'strict' (error if any doc exceeds cap). session_token: Optional opaque string used as per-session cache key. max_single_doc_tokens: Truncate individual documents to this many tokens. 0 = no per-doc limit. safety_factor: Fraction of max_tokens to use as effective cap (default 0.60 = 60%).

vault_primeA

Pre-load all vault documents into the current session by priority order.

Equivalent to vault_inject with no query: loads all documents ordered by priority weight (authoritative first), then by recency. Use at session start to orient yourself on all knowledge available in a vault.

Args: vault_name: Vault name or ID. max_tokens: Hard token budget. Effective cap = max_tokens * safety_factor. cap_behavior: 'best_effort' (inject as many docs as fit) or 'strict' (error if cap exceeded). session_token: Optional opaque string used as per-session cache key. max_single_doc_tokens: Truncate individual documents to this many tokens. safety_factor: Fraction of max_tokens to use as effective cap (default 0.60 = 60%).

vault_inject_by_tagA

Load all documents matching any of the given tags into the current conversation context.

Documents matching any of the provided tags are fetched, ranked by priority weight and recency, then packed greedily within the token cap.

Args: vault_name: Vault name or ID. tags: List of tags to match (OR semantics: any matching tag includes the doc). max_tokens: Hard token budget. Effective cap = max_tokens * safety_factor. cap_behavior: 'best_effort' (inject as many docs as fit) or 'strict'. session_token: Optional opaque string used as per-session cache key. max_single_doc_tokens: Truncate individual documents to this many tokens. safety_factor: Fraction of max_tokens to use as effective cap (default 0.60 = 60%).

vault_inject_summaryA

Generate a summary overview of a vault's contents for conversation orientation.

Lists all documents with their categories, tags, priorities, and notes. Useful at the start of a conversation to understand what knowledge is available.

vault_get_injection_capA

Return the stored per-vault injection token cap (or 'not set' if none).

If not set, the server falls back to LOREDOCS_INJECTION_CAP_TOKENS env var, then LOREDOCS_INJECTION_DEFAULT_CAP_TOKENS (default 100000).

vault_get_session_tokenA

Generate a fresh session token (UUID4) for use with vault_inject / vault_prime.

Pass the returned token as session_token in subsequent injection calls so the per-session cache can scope cached results to this conversation. Cache hits are valid until any document in the vault is updated.

vault_estimate_tokensA

Preview the token count of a vault injection without injecting documents.

Returns estimated token counts for each document (up to 500) so you can choose an appropriate max_tokens value before calling vault_inject. Uses tiktoken if available; falls back to char-based estimation.

vault_get_server_capabilitiesA

Return a summary of this LoreDocs server's injection capabilities and token estimation settings.

Useful for diagnosing injection behavior or verifying which features are active.

vault_import_dirA

Bulk import all supported files from a directory into a vault.

Imports text files, PDFs, Word docs, Excel files, PowerPoints, and more. Each file becomes a separate document with text extracted for search indexing. Files over 30MB are skipped. Hidden files (starting with .) are skipped.

Supports Obsidian vaults: subdirectories are traversed recursively by default (set recursive=False for single-level import). Markdown files with YAML frontmatter tags (tags: [a, b] or block-list style) have those tags merged into the document.

vault_exportA

Export all documents from a vault to a local directory.

Copies the original files (not extracted text) to the specified directory. Useful for backing up or sharing vault contents.

vault_link_docA

Create a link between two documents across any vault.

Links are bidirectional and labelled (e.g. 'related', 'references', 'supersedes', 'part-of'). If the link already exists, reports it. Use vault_find_related to discover all docs linked to a given document.

vault_unlink_docA

Remove a link between two documents (both directions).

If no link exists between the two documents, reports that cleanly.

vault_find_relatedA

Find all documents linked to a given document. Pro only.

Returns each related document with its vault, category, tags, and link label. Use vault_link_doc to create new links.

vault_suggestA

Get suggestions for documents that may need attention.

Surfaces documents that are undocumented (no notes), unorganized (no tags), or isolated (no links to other documents). Use to guide housekeeping work or to discover documents that haven't been connected to the broader graph.

Optionally scope to a single vault.

vault_export_manifestB

Export a complete manifest of a vault's contents.

Returns vault metadata, document list with tags and categories, tag frequency index, category counts, and link count. Use the json format for machine-readable output. Use the markdown format for human-readable summaries.

vault_tier_statusA

Show current tier (Free or Pro) and usage vs. limits.

Displays how many vaults and how much storage are in use, with percentages against Free tier limits. Useful before hitting a limit to know how close you are, or to confirm Pro tier is active after upgrading.

vault_set_tierA

Activate a tier (free or pro) for LoreDocs.

Pro tier removes all vault, document, storage, and version limits. After purchasing a Pro license, set LOREDOCS_PRO= in your environment and restart the server, then call this tool with tier='pro' to persist the Pro tier. Reverting to tier='free' re-enables limits (but does not delete any existing data that exceeds the limits -- it only blocks new writes).

get_license_tierA

Return the current LoreDocs license tier and status.

Use this to confirm whether the Pro license key is loaded and valid.

Returns a dict with keys: is_pro -- bool, True if Pro tier is active mode -- "licensed" | "dev_bypass" | "free" | "invalid_key" product -- product name from the license payload (if licensed) exp -- expiry date or "never" (if licensed) email -- customer email (if licensed and present) error -- error message (if mode is "invalid_key") upgrade_url -- Stripe checkout link (present when not already Pro)

vault_link_sessionA

Create a manual cross-product link from a LoreConvo session to a LoreDocs doc.

Both LoreConvo and LoreDocs must be installed. Manual links are accessible on all tiers. The linked doc must not be in an opt-out vault.

Args: session_id -- LoreConvo session UUID doc_id -- LoreDocs document ID vault_id -- LoreDocs vault containing the document

Returns dict with: ok -- bool session_id, doc_id on success reason -- failure description (generic; details in debug log)

vault_get_session_linksA

Return cross-product LoreConvo sessions linked to a LoreDocs document.

Both LoreConvo and LoreDocs must be installed. Requires Pro tier for auto-links. Manual links are always returned.

Args: doc_id -- LoreDocs document ID limit -- max results (default 5)

Returns dict with: schema_version -- CROSS_LINK_SCHEMA_VERSION for version negotiation cross_product_available -- bool tier_gate -- "satisfied" | "pro_required" links -- list of {target_product, target_id, similarity_score, link_type, created_at, is_stale}

vault_get_linked_sessionsA

Return LoreDocs documents linked to a given LoreConvo session.

Queries the LoreDocs cross_product_links table for links where the session is the source or target. Returns both auto and manual links. Requires Pro tier for auto-links.

Args: session_id -- LoreConvo session UUID limit -- max results (default 5)

Returns same structure as vault_get_session_links.

get_server_infoA

Return MCP compatibility status for this LoreDocs server.

Returns product version, installed mcp SDK version, tested version, and compatibility status. Useful for diagnosing version mismatches on running servers without requiring a restart.

Returns dict with: product_name, product_version, mcp_installed, mcp_tested, mcp_accepted, status (ok|mismatch|undetermined|disabled|internal_error), note, error_detail (set only on internal_error).

vault_import_notionA

Import Notion pages and databases into a LoreDocs vault.

Uses the import-once-and-own model: pages are fetched once and stored as LoreDocs documents. No live sync dependency.

Token is read from the NOTION_TOKEN environment variable or OS keychain -- it is NEVER passed as a parameter, so it never appears in MCP tool-call logs.

vault accepts a vault ID (stable across renames, preferred for automation) or a vault name (case-insensitive, for interactive use).

page_ids and database_ids accept Notion UUIDs (32 hex chars without dashes or 36 chars with dashes). Both null/omitted = rejected (at least one required).

continuation_token: opaque token from a prior call's return value. When provided, omit page_ids/database_ids/vault/checkpoint_file to resume. The token encodes the vault's primary-key UUID -- recreation under the same name invalidates the token.

Block depth is capped at LOREDOCS_NOTION_MAX_BLOCK_DEPTH (default 10). Pages hitting the cap are listed in truncated_pages in the return value.

MCP host cancellation may leave a partial checkpoint. Use the continuation_token from the last successful response to resume, or run a fresh import (deduplication prevents re-import of already-committed pages).

vault_import_notion_setupA

Report Notion import readiness and how to enable it. Read-only. Does not install or modify any packages.

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/labyrinth-analytics/loredocs'

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