Skip to content

Commit 1ebb4af

Browse files
maxholmanclaude
andcommitted
docs(mcp): update tool descriptions for ping, hints, and disconnect
Ping description no longer advertises unimplemented peer ping. Hint descriptions explain the auto-negotiation model. Disconnect description clarifies that peers may auto-reconnect after being dropped. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3583adb commit 1ebb4af

2 files changed

Lines changed: 20 additions & 10 deletions

File tree

crates/cli/src/repl.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ fn print_help() {
255255

256256
let mut tw = TabWriter::new(std::io::stdout());
257257
let _ = writeln!(tw, "Commands:");
258-
let _ = writeln!(tw, " ping [<peer>]\tPing a peer");
258+
let _ = writeln!(tw, " ping\tPing the daemon (peer ping not yet supported)");
259259
let _ = writeln!(tw, " info\tShow daemon info");
260260
let _ = writeln!(tw, " version\tShow version");
261261
let _ = writeln!(tw, " stats\tShow traffic statistics");
@@ -265,14 +265,20 @@ fn print_help() {
265265
let _ = writeln!(tw, " route del <cidr>\tRemove a route");
266266
let _ = writeln!(tw, " connect <addr>\tConnect to a peer");
267267
let _ = writeln!(tw, " listen <addr>\tStart listening for connections");
268-
let _ = writeln!(tw, " disconnect [peer]\tDisconnect peer");
268+
let _ = writeln!(
269+
tw,
270+
" disconnect [peer]\tDrop peer session (peer may reconnect)"
271+
);
269272
let _ = writeln!(tw, " role\tShow current role");
270273
let _ = writeln!(tw, " role <entry|exit|relay>\tSet role hint");
271274
let _ = writeln!(
272275
tw,
273-
" hint <prefer|exclude|fixed> <role>\tApply a role hint"
276+
" hint <prefer|exclude|fixed> <role>\tSet hint to influence auto-negotiation"
277+
);
278+
let _ = writeln!(
279+
tw,
280+
" hint auto\tRemove all hints, return to automatic negotiation"
274281
);
275-
let _ = writeln!(tw, " hint auto\tReturn to capability-based negotiation");
276282
let _ = writeln!(tw, " shutdown\tShut down the daemon");
277283
let _ = writeln!(tw, " help / ?\tShow this help");
278284
let _ = writeln!(tw, " quit \tQuit the REPL");

crates/mcp/src/tools.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::convert;
1111

1212
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]
1313
pub struct PingParams {
14-
/// Peer name prefix to ping. Omit to ping the daemon itself.
14+
/// Reserved — peer-specific ping is not yet supported. Leave empty.
1515
pub peer: Option<String>,
1616
}
1717

@@ -43,7 +43,7 @@ pub struct AddrParams {
4343

4444
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]
4545
pub struct HintSetParams {
46-
/// Hint level: "prefer", "exclude", or "fixed"
46+
/// How strongly to apply the hint: "prefer" (soft), "exclude" (avoid), or "fixed" (force)
4747
pub level: String,
4848
/// Target role: "entry", "exit", or "relay"
4949
pub role: String,
@@ -75,7 +75,9 @@ impl WallhackServer {
7575
ipc_call(management_request::Request::Info(InfoRequest {})).await
7676
}
7777

78-
#[tool(description = "Ping the daemon (or a specific peer by name prefix)")]
78+
#[tool(
79+
description = "Ping the daemon to check liveness. Returns role, version, and uptime. (Peer-specific ping is not yet supported.)"
80+
)]
7981
async fn ping(
8082
&self,
8183
Parameters(params): Parameters<PingParams>,
@@ -151,7 +153,7 @@ impl WallhackServer {
151153
}
152154

153155
#[tool(
154-
description = "Disconnect a peer by name, or disconnect the transport if no peer specified"
156+
description = "Disconnect a peer by name (drops the current session; the peer may reconnect automatically). If no peer specified, disconnect the local transport."
155157
)]
156158
async fn disconnect(
157159
&self,
@@ -179,7 +181,7 @@ impl WallhackServer {
179181
}
180182

181183
#[tool(
182-
description = "Set a role hint to influence auto-negotiation (prefer/exclude/fixed + entry/exit/relay)"
184+
description = "Set a role hint to influence auto-negotiation: \"prefer\" makes the role more likely, \"exclude\" prevents it, \"fixed\" forces it"
183185
)]
184186
async fn hint_set(
185187
&self,
@@ -214,7 +216,9 @@ impl WallhackServer {
214216
.await
215217
}
216218

217-
#[tool(description = "Return to capability-based negotiation by removing all role hints")]
219+
#[tool(
220+
description = "Remove all role hints and return to automatic role negotiation based on peer capabilities. Use to undo a previous hint_set."
221+
)]
218222
async fn hint_set_auto(&self) -> Result<String, rmcp::ErrorData> {
219223
ipc_call(management_request::Request::HintSetAuto(
220224
HintSetAutoRequest {},

0 commit comments

Comments
 (0)