feat(model): add ServerConfig and ClientConfig (#1266)
This commit is contained in:
parent
fbfc5cc96e
commit
165ff92df1
1 changed files with 331 additions and 303 deletions
|
|
@ -4,7 +4,7 @@ use std::sync::Arc;
|
|||
|
||||
use rmcp::{
|
||||
ServerHandler,
|
||||
model::{InitializeResult, ServerCapabilities, Tool},
|
||||
model::{ServerCapabilities, ServerConfig, Tool},
|
||||
transport::streamable_http_server::{
|
||||
StreamableHttpServerConfig, StreamableHttpService, session::local::LocalSessionManager,
|
||||
},
|
||||
|
|
@ -18,8 +18,8 @@ const SEP_VERSION: &str = "2026-07-28";
|
|||
struct HeaderValidationServer;
|
||||
|
||||
impl ServerHandler for HeaderValidationServer {
|
||||
fn get_info(&self) -> InitializeResult {
|
||||
InitializeResult::new(ServerCapabilities::builder().enable_tools().build())
|
||||
fn get_info(&self) -> ServerConfig {
|
||||
ServerConfig::new(ServerCapabilities::builder().enable_tools().build())
|
||||
}
|
||||
|
||||
fn get_tool(&self, name: &str) -> Option<Tool> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue