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
|
|
@ -18,8 +18,8 @@ use std::{sync::Arc, time::Duration};
|
|||
use rmcp::{
|
||||
ErrorData as McpError, RoleServer, ServerHandler,
|
||||
model::{
|
||||
CallToolRequestParams, CallToolResponse, CallToolResult, ContentBlock, InitializeResult,
|
||||
ServerCapabilities,
|
||||
CallToolRequestParams, CallToolResponse, CallToolResult, ContentBlock, ServerCapabilities,
|
||||
ServerConfig,
|
||||
},
|
||||
service::RequestContext,
|
||||
transport::streamable_http_server::{
|
||||
|
|
@ -37,8 +37,8 @@ struct CancelProbe {
|
|||
|
||||
impl ServerHandler for CancelProbe {
|
||||
#[allow(deprecated)]
|
||||
fn get_info(&self) -> InitializeResult {
|
||||
InitializeResult::new(ServerCapabilities::builder().enable_tools().build())
|
||||
fn get_info(&self) -> ServerConfig {
|
||||
ServerConfig::new(ServerCapabilities::builder().enable_tools().build())
|
||||
}
|
||||
|
||||
async fn call_tool(
|
||||
|
|
|
|||
Loading…
Reference in a new issue