From 264b8ed71092fe644d3b7ab43f90075ebd8dc4d3 Mon Sep 17 00:00:00 2001 From: Alexa Agnew Date: Mon, 12 Oct 2026 16:14:42 -0700 Subject: [PATCH 1/2] warn that unscoped list_channels name searches can time out Co-Authored-By: Claude Opus 5.5 --- rust/crates/sift_mcp/src/tool/channels/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rust/crates/sift_mcp/src/tool/channels/mod.rs b/rust/crates/sift_mcp/src/tool/channels/mod.rs index f23c608961..7ce6e72f1b 100644 --- a/rust/crates/sift_mcp/src/tool/channels/mod.rs +++ b/rust/crates/sift_mcp/src/tool/channels/mod.rs @@ -56,6 +56,9 @@ impl SiftMcpServer { Guidance: - Always scope with `asset_id == \"...\"` when the asset is known — channel namespaces are per-asset and unscoped queries return cross-asset results. + - Unscoped name searches scan every channel in the org and can time out in large orgs. Resolve + candidate assets with `list_assets` first, then search each with `asset_id == \"...\" && name.matches(...)`. + A timeout means the filter was too broad, not that the parameters were wrong; narrow it before retrying. - To enumerate channels recorded by a specific run, filter on `run_id` rather than joining client-side. ", annotations(title = "channels/list_channels", read_only_hint = true) From ad2d4356af0d2b51b4655d68ab76a5e06b0d2611 Mon Sep 17 00:00:00 2001 From: Alexa Agnew Date: Tue, 13 Oct 2026 11:14:07 -0700 Subject: [PATCH 2/2] test that list_channels guidance warns about unscoped name searches Co-Authored-By: Claude Opus 5.5 --- .../crates/sift_mcp/src/tool/channels/test.rs | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/rust/crates/sift_mcp/src/tool/channels/test.rs b/rust/crates/sift_mcp/src/tool/channels/test.rs index 4cfbb7c718..926c1aaeb4 100644 --- a/rust/crates/sift_mcp/src/tool/channels/test.rs +++ b/rust/crates/sift_mcp/src/tool/channels/test.rs @@ -247,3 +247,32 @@ async fn list_channels_reports_a_field_that_matched_nothing() { ); assert_eq!(body["unmatched_fields"], serde_json::json!(["nmae"])); } + +#[test] +fn tool_description_warns_that_unscoped_name_searches_can_time_out() { + let tools = SiftMcpServer::channels_router().list_all(); + let tool = tools + .iter() + .find(|tool| tool.name == "list_channels") + .expect("list_channels is routed"); + let description = tool + .description + .as_deref() + .expect("list_channels has a description"); + + assert!( + description + .contains("Unscoped name searches scan every channel in the org and can time out"), + "the description must warn that unscoped name searches can time out" + ); + assert!( + description.contains("candidate assets with `list_assets` first"), + "the description must tell the agent to resolve assets before searching" + ); + assert!( + description.contains( + "A timeout means the filter was too broad, not that the parameters were wrong" + ), + "the description must say a timeout calls for a narrower filter" + ); +}