Skip to content

Commit aa10a77

Browse files
committed
only use new imports
1 parent fca6784 commit aa10a77

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

examples/clients/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
[package]
42
name = "mcp-client-examples"
53
version = "0.1.5"
@@ -13,12 +11,13 @@ rmcp = { path = "../../crates/rmcp", features = [
1311
"transport-child-process",
1412
"tower"
1513
] }
14+
rmcp-core = { path = "../../crates/rmcp-core", features = ["macros"] }
1615
tokio = { version = "1", features = ["full"] }
1716
serde = { version = "1.0", features = ["derive"] }
1817
serde_json = "1.0"
1918
tracing = "0.1"
2019
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
21-
rand = "0.8"
20+
rand = "0.9"
2221
futures = "0.3"
2322
anyhow = "1.0"
2423

examples/clients/src/everything_stdio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ use anyhow::Result;
22
use rmcp::{
33
ServiceExt,
44
model::{CallToolRequestParam, GetPromptRequestParam, ReadResourceRequestParam},
5-
object,
65
transport::TokioChildProcess,
76
};
7+
use rmcp_core::object;
88
use tokio::process::Command;
99
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
1010

examples/transport/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ readme = { workspace = true }
1515
all-features = true
1616

1717
[dependencies]
18-
rmcp = { path = "../../crates/rmcp", features = ["server", "client"] }
18+
rmcp = { path = "../../crates/rmcp", features = ["server", "client", "macros"] }
19+
rmcp-core = { path = "../../crates/rmcp-core", features = ["macros"] }
1920
tokio = { version = "1", features = [
2021
"macros",
2122
"rt",

examples/transport/src/unix_socket.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use std::fs;
22

33
use common::calculator::Calculator;
4-
use rmcp::{serve_client, serve_server};
4+
use rmcp::{serve_client, serve_server, model::CallToolRequestParam};
5+
use rmcp_core::object;
56
use tokio::net::{UnixListener, UnixStream};
67

78
mod common;
@@ -66,9 +67,9 @@ async fn client() -> anyhow::Result<()> {
6667
println!("Calling sum tool: {}", sum_tool.name);
6768
let result = client
6869
.peer()
69-
.call_tool(rmcp::model::CallToolRequestParam {
70+
.call_tool(CallToolRequestParam {
7071
name: sum_tool.name.clone(),
71-
arguments: Some(rmcp::object!({
72+
arguments: Some(object!({
7273
"a": 10,
7374
"b": 20
7475
})),

0 commit comments

Comments
 (0)