diff --git a/crates/rmcp/src/transport/streamable_http_server/tower.rs b/crates/rmcp/src/transport/streamable_http_server/tower.rs index 90473b32..475dbff3 100644 --- a/crates/rmcp/src/transport/streamable_http_server/tower.rs +++ b/crates/rmcp/src/transport/streamable_http_server/tower.rs @@ -44,6 +44,19 @@ impl Default for StreamableHttpServerConfig { } } +/// # Streamable Http Server +/// +/// ## Extract information from raw http request +/// +/// The http service will consume the request body, however the rest part will be remain and injected into [`crate::model::Extensions`], +/// which you can get from [`crate::service::RequestContext`]. +/// ```rust +/// use rmcp::handler::server::tool::Extension; +/// use http::request::Parts; +/// async fn my_tool(Extension(parts): Extension) { +/// tracing::info!("http parts:{parts:?}") +/// } +/// ``` pub struct StreamableHttpService { pub config: StreamableHttpServerConfig, session_manager: Arc,