crates_docs/server/handler/mod.rs
1//! MCP request handler implementation
2//!
3//! Provides MCP protocol request handling logic, including tool listing, tool invocation, and resource lists.
4//!
5//! # Main Structs
6//!
7//! - `HandlerCore`: Shared core handling logic (internal use)
8//! - `CratesDocsHandler`: Standard MCP handler
9//! - `CratesDocsHandlerCore`: Core handler (provides more fine-grained control)
10//!
11//! # Design Pattern
12//!
13//! Uses composition pattern to eliminate code duplication:
14//! - `HandlerCore` encapsulates all shared handling logic
15//! - `CratesDocsHandler` and `CratesDocsHandlerCore` delegate to `HandlerCore`
16//! - Supports config merging and optional metrics integration
17
18mod config;
19mod core;
20mod core_handler;
21mod standard;
22mod types;
23
24pub use config::HandlerConfig;
25pub use core::HandlerCore;
26pub use core_handler::CratesDocsHandlerCore;
27pub use standard::CratesDocsHandler;
28pub use types::ToolExecutionResult;