Skip to content

Commit 4cc6b4b

Browse files
committed
feat(meta-tools): guide @mux to optimize minimal-first
Optimizing was slow because the model dumped the whole catalog and built one large FeatureSet upfront. Add concise (token-cheap) guidance steering it to start minimal and expand on demand: - Server instructions: "start minimal, expand later" one-liner. - mcpmux_list_all_tools: prefer mcpmux_search_tools; flag the full dump as token-heavy. - mcpmux_manage_feature_set: prefer a small initial set expanded later. Guidance-only; no tool behavior change. Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
1 parent f87c3f2 commit 4cc6b4b

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

crates/mcpmux-gateway/src/mcp/handler.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,10 @@ impl ServerHandler for McpMuxGatewayHandler {
368368
list_feature_sets) are safe to call freely once the user has opted \
369369
in; writes (manage_feature_set, bind_current_workspace) prompt the \
370370
user for approval. Most operations accept an optional `space_id` \
371-
(from mcpmux_list_spaces) to target a specific Space."
371+
(from mcpmux_list_spaces) to target a specific Space. When \
372+
optimizing, start minimal: search for the few tools the task needs, \
373+
compose a small set, then expand it later as needs arise rather than \
374+
dumping the whole catalog upfront."
372375
.to_string(),
373376
);
374377
info

crates/mcpmux-gateway/src/services/meta_tools/tools.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ impl MetaTool for ListAllToolsTool {
116116
fn description(&self) -> &'static str {
117117
"List every tool installed in a Space (default: the caller's resolved \
118118
Space; pass `space_id` to target another), without the current \
119-
FeatureSet filter applied. Use this to see what could be exposed \
120-
before composing a custom FeatureSet. Returns an array of \
119+
FeatureSet filter applied. Prefer `mcpmux_search_tools` unless you need \
120+
the full list — this dump is token-heavy. Returns an array of \
121121
{server_id, qualified_name, description, available}."
122122
}
123123

@@ -716,7 +716,8 @@ impl MetaTool for ManageFeatureSetTool {
716716
(needs `feature_set_id`). Tool names are the qualified names from \
717717
`mcpmux_list_all_tools`/`mcpmux_search_tools`. Built-in sets can't be \
718718
modified. Requires user approval. Route a workspace through a FeatureSet \
719-
with `mcpmux_bind_current_workspace`."
719+
with `mcpmux_bind_current_workspace`. Prefer a small initial set you \
720+
expand later over adding everything upfront."
720721
}
721722

722723
fn input_schema(&self) -> Value {

0 commit comments

Comments
 (0)