Skip to content

Commit f9a356a

Browse files
authored
Merge pull request #123 from jamadeo/rmcp-1.2.0
Update to rmcp 1.2.0
2 parents 9569a52 + 2913653 commit f9a356a

5 files changed

Lines changed: 18 additions & 18 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ tracing-appender = "0.2"
3939
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
4040

4141
# MCP SDK
42-
rmcp = { version = "1.0.0-alpha", features = ["server", "transport-io", "schemars"] }
42+
rmcp = { version = "1.2.0", features = ["server", "transport-io", "schemars"] }
4343

4444
# CLI parsing
4545
clap = { version = "4.5", features = ["derive"] }

src/sacp-conductor/tests/trace_client_mcp_server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ async fn test_trace_client_mcp_server() -> Result<(), sacp::Error> {
439439
"capabilities": Object {},
440440
"clientInfo": Object {
441441
"name": String("rmcp"),
442-
"version": String("1.0.0-alpha"),
442+
"version": String("1.2.0"),
443443
},
444444
"protocolVersion": String("2025-06-18"),
445445
},
@@ -460,7 +460,7 @@ async fn test_trace_client_mcp_server() -> Result<(), sacp::Error> {
460460
"protocolVersion": String("2025-06-18"),
461461
"serverInfo": Object {
462462
"name": String("rmcp"),
463-
"version": String("1.0.0-alpha"),
463+
"version": String("1.2.0"),
464464
},
465465
},
466466
},

src/sacp-conductor/tests/trace_mcp_tool_call.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ async fn test_trace_mcp_tool_call() -> Result<(), sacp::Error> {
425425
"capabilities": Object {},
426426
"clientInfo": Object {
427427
"name": String("rmcp"),
428-
"version": String("1.0.0-alpha"),
428+
"version": String("1.2.0"),
429429
},
430430
"protocolVersion": String("2025-06-18"),
431431
},
@@ -446,7 +446,7 @@ async fn test_trace_mcp_tool_call() -> Result<(), sacp::Error> {
446446
"protocolVersion": String("2025-06-18"),
447447
"serverInfo": Object {
448448
"name": String("rmcp"),
449-
"version": String("1.0.0-alpha"),
449+
"version": String("1.2.0"),
450450
},
451451
},
452452
},

src/sacp/src/mcp_server/builder.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -510,21 +510,21 @@ trait ErasedMcpTool<Counterpart: Role>: Send + Sync {
510510

511511
/// Create an `rmcp` tool model from our [`McpTool`] trait.
512512
fn make_tool_model<R: Role, M: McpTool<R>>(tool: &M) -> Tool {
513-
{
514-
rmcp::model::Tool::new(
515-
tool.name(),
516-
tool.description(),
517-
schema_for_type::<M::Input>(),
518-
)
513+
let mut tool = rmcp::model::Tool::new(
514+
tool.name(),
515+
tool.description(),
516+
schema_for_type::<M::Input>(),
517+
)
518+
.with_execution(rmcp::model::ToolExecution::new());
519+
520+
if let Some(schema) = schema_for_output::<M::Output>().ok() {
519521
// schema_for_output returns Err for non-object types (strings, integers, etc.)
520-
// since MCP structured output requires JSON objects. We use .ok() to set
522+
// since MCP structured output requires JSON objects. We set
521523
// output_schema to None for these tools, signaling unstructured output.
522-
.with_raw_output_schema(schema_for_output::<M::Output>().ok())
523-
.with_annotations(None)
524-
.with_icons(None)
525-
.with_meta(None)
526-
.with_execution(Some(rmcp::model::ToolExecution::new()))
524+
tool = tool.with_raw_output_schema(schema);
527525
}
526+
527+
tool
528528
}
529529

530530
/// Create a [`ErasedMcpTool`] from a [`McpTool`], erasing the type details.

src/sacp/src/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ where
680680
// Step 3: Drain any messages that were already queued and forward to client.
681681
// These messages arrived before we dropped the handler but haven't been
682682
// consumed yet. We must forward them to maintain message ordering.
683-
while let Some(message) = update_rx.try_next().ok().flatten() {
683+
while let Some(message) = update_rx.try_recv().ok() {
684684
match message {
685685
SessionMessage::SessionMessage(dispatch) => {
686686
// Forward the message to the client

0 commit comments

Comments
 (0)