Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Tools

list_sections

List all collections and their sections with document counts and descriptions.

Parameters: None

Returns: JSON array of sections with name, description, doc_count, and collection.

Full-text search across the knowledge base using BM25 ranking.

Parameters:

NameTypeRequiredDescription
queryStringYesSearch query (supports phrases and boolean operators)
collectionStringNoFilter by collection name
scopeStringNoFilter by section prefix
max_resultsNumberNoMaximum results (default: 10)

Returns: JSON with query, total, and results array. Each result has path, title, section, collection, score, and excerpt.

get_document

Retrieve a document by path or title. Content is read fresh from disk.

Parameters:

NameTypeRequiredDescription
pathStringYesDocument path or title

Returns: JSON with path, title, tags, section, collection, and content.

kb_context

Token-efficient document briefing. Returns frontmatter metadata and first paragraph summary without the full body.

Call this to survey relevance before using get_document for full content. Saves 90%+ tokens on retrieval-heavy workflows.

Parameters:

NameTypeRequiredDescription
pathStringYesDocument path or title

Returns: JSON with path, title, tags, section, collection, frontmatter (all fields), and summary (first paragraph).

kb_write

Create a new document in a writable collection. Generates frontmatter with a date-prefixed filename by default. Use directory to write into subdirectories and filename to specify an exact name without date prefix.

Parameters:

NameTypeRequiredDescription
collectionStringYesTarget collection (must be writable)
titleStringYesDocument title
bodyStringYesDocument body (markdown)
tagsListNoTags for frontmatter
statusStringNoStatus field for frontmatter
sourceStringNoSource field for frontmatter
directoryStringNoSubdirectory within collection (e.g. “concepts/memory”). Created automatically.
filenameStringNoExact filename (e.g. “cognitive-memory-model.md”). Skips date prefix when provided.

Returns: JSON with path, collection, title, and tags.

Errors: Returns actionable error if collection is read-only, not found, or directory escapes the collection root.

kb_digest

Vault summary — shows collections, sections with topics, recent additions (last 7 days), and thin sections (fewer than 2 documents). Use this to understand what the knowledge base covers before searching.

Parameters:

NameTypeRequiredDescription
collectionStringNoFilter to a specific collection

Returns: JSON with total_documents, total_sections, and collections array. Each collection has name, doc_count, sections (with topics and gap hints), and recent additions.

kb_query

Filter documents by frontmatter fields. Multiple filters combine with AND logic. Returns document metadata without body content.

Parameters:

NameTypeRequiredDescription
tagStringNoFilter by tag
statusStringNoFilter by frontmatter status field
created_afterStringNoYYYY-MM-DD, returns docs created on or after
collectionStringNoFilter by collection name
has_sourcesBooleanNoOnly docs with a sources field

Returns: JSON with total and documents array. Each document has path, title, tags, section, and collection.

kb_export

Export vault as a single markdown document. Concatenates documents with frontmatter headers, limited to max_documents to prevent unbounded output.

Parameters:

NameTypeRequiredDescription
collectionStringNoCollection to export (default: all)
max_documentsNumberNoMaximum documents to include (default: 200)

Returns: Concatenated markdown with document separators and frontmatter metadata. Appends a truncation notice if the limit is hit.

kb_health

Vault health diagnostics — checks document quality across collections. Flags missing frontmatter dates, untagged docs, stale content, stub documents, orphaned notes (no inbound wiki-links), and broken wiki-links. Use kb_digest for coverage overview, kb_health for quality issues.

Parameters:

NameTypeRequiredDescription
collectionStringNoFilter to a specific collection
stale_daysNumberNoDays threshold for staleness (default: 90)
min_wordsNumberNoMinimum word count for stub detection (default: 50)

Returns: JSON with total_documents_checked, total_issues, and per-collection arrays for each check: missing_created, missing_updated, no_tags, stale, stubs, orphans, broken_links.

reindex

Rebuild the search index from all collections on disk. Use after editing documents mid-session. Note: search now auto-detects new files via directory mtime checks, so reindex is mainly needed after in-place content edits.

Parameters: None

Returns: Summary message with document and section counts.