Expand description
MCP 工具模块
提供用于 Rust crate 文档查询的 MCP 工具。
§工具列表
docs::lookup_crate::LookupCrateToolImpl: 查找 crate 文档docs::search::SearchCratesToolImpl: 搜索 cratedocs::lookup_item::LookupItemToolImpl: 查找特定项目health::HealthCheckToolImpl: 健康检查
§示例
use std::sync::Arc;
use crates_docs::tools::{ToolRegistry, create_default_registry};
use crates_docs::tools::docs::DocService;
use crates_docs::cache::memory::MemoryCache;
let cache = Arc::new(MemoryCache::new(1000));
let doc_service = Arc::new(DocService::new(cache).unwrap());
let registry = create_default_registry(&doc_service);Modules§
Structs§
- Tool
Registry - 工具注册表
Traits§
- Tool
- 工具 trait
Functions§
- create_
default_ registry - 创建默认工具注册表