feat!: add MRTR behavior support (SEP-2322) (#929)
* feat!: add MRTR behavior support * feat: harden SEP-2322 MRTR support * ci: diff public API only on features common to base and head cargo public-api builds both revisions with the same feature set, so a feature introduced (or removed) by a PR broke the build of the other revision. Restrict the all-features diff to features present in both the base and head revisions.
This commit is contained in:
parent
a7194590ff
commit
dd30a70f84
1 changed files with 2121 additions and 127 deletions
|
|
@ -4,7 +4,10 @@ use std::{collections::BTreeSet, process::Stdio, time::Duration};
|
|||
|
||||
use rmcp::{
|
||||
ErrorData as McpError, ServerHandler, ServiceExt,
|
||||
model::{CallToolRequestParams, CallToolResult, ContentBlock, ServerCapabilities, ServerInfo},
|
||||
model::{
|
||||
CallToolRequestParams, CallToolResponse, CallToolResult, ContentBlock, ServerCapabilities,
|
||||
ServerInfo,
|
||||
},
|
||||
};
|
||||
use serde_json::{Value, json};
|
||||
use tokio::{
|
||||
|
|
@ -87,11 +90,9 @@ impl ServerHandler for LargeResponseServer {
|
|||
&self,
|
||||
request: CallToolRequestParams,
|
||||
_context: rmcp::service::RequestContext<rmcp::RoleServer>,
|
||||
) -> Result<CallToolResult, McpError> {
|
||||
) -> Result<CallToolResponse, McpError> {
|
||||
assert_eq!("large-response", request.name.as_ref());
|
||||
Ok(CallToolResult::success(vec![ContentBlock::text(
|
||||
"x".repeat(RESPONSE_BYTES),
|
||||
)]))
|
||||
Ok(CallToolResult::success(vec![ContentBlock::text("x".repeat(RESPONSE_BYTES))]).into())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue