Module tools

Module tools 

Source
Expand description

§Search Tools Module

Provides MCP tool integration for fuzzy search functionality.

§Key Components

§Features

  • Automatic crate indexing on first search
  • Fuzzy search with configurable edit distance
  • Result filtering by kind and crate

§Example

let cache = Arc::new(RwLock::new(CrateCache::new(None)?));
let tools = SearchTools::new(cache);

let params = SearchItemsFuzzyParams {
    crate_name: "serde".to_string(),
    version: "1.0.0".to_string(),
    query: "deserialize".to_string(),
    fuzzy_enabled: Some(true),
    fuzzy_distance: Some(1),
    limit: Some(10),
    kind_filter: None,
    member: None,
};

let results = tools.search_items_fuzzy(params).await;

Structs§

SearchItemsFuzzyParams
SearchTools