Skip to content

Search Tools

Crucible provides three complementary search methods through MCP (Model Context Protocol) tools.

Search functionality is provided through MCP tools rather than a dedicated CLI command. This allows agents and external tools to search your knowledge base programmatically.

  1. semantic_search - Find notes by meaning using vector embeddings
  2. text_search - Fast full-text search with regex support
  3. property_search - Query notes by frontmatter properties and tags

Search notes using semantic similarity based on vector embeddings.

semantic_search

ParameterTypeRequiredDefaultDescription
querystringYes-Natural language search query
limitnumberNo10Maximum results to return
{
"query": "machine learning algorithms",
"limit": 5
}
  • Finding conceptually related notes
  • Discovering connections between ideas
  • Locating notes when you don’t remember exact wording
  • Building context for AI agents

Fast full-text search across markdown files.

text_search

ParameterTypeRequiredDefaultDescription
querystringYes-Text to search for
folderstringNonullSubfolder to search within
case_insensitivebooleanNotrueCase-insensitive search
limitnumberNo10Maximum matches to return

Basic search:

{
"query": "TODO",
"limit": 10
}

Search in specific folder:

{
"query": "FIXME",
"folder": "Projects/Active",
"case_insensitive": false
}
  • Finding exact text matches
  • Locating TODOs, FIXMEs, or other markers
  • Searching within specific project folders

Search notes by frontmatter properties, including tags.

property_search

ParameterTypeRequiredDefaultDescription
propertiesobjectYes-Key-value pairs to match
limitnumberNo10Maximum results to return

Single property:

{
"properties": { "status": "draft" },
"limit": 10
}

Tag search (OR logic):

{
"properties": { "tags": ["urgent", "important"] },
"limit": 20
}
  • Multiple properties: ALL must match (AND logic)
  • Array values: Matches if ANY value matches (OR logic)
Terminal window
cru mcp --stdio
Terminal window
cru chat "Find all notes about machine learning"

When to use semantic_search:

  • Finding related concepts
  • Exploring topic connections
  • When you know the idea but not exact words

When to use text_search:

  • Finding exact phrases or terms
  • Locating action items (TODO, FIXME)
  • Quick literal lookups

When to use property_search:

  • Filtering by metadata
  • Finding notes by status/type
  • Tag-based queries

Code reference: crates/crucible-daemon/src/tools/search.rs

  • :h mcp - MCP server documentation
  • :h config.embedding - Embedding configuration
  • :h frontmatter - YAML frontmatter format
  • :h tags - Tag system documentation