Skip to content

feat(meta-tools): guide @mux to optimize minimal-first, expand on demand - #170

Closed
its-mash wants to merge 1 commit into
mainfrom
feat/mux-minimal-first-optimization
Closed

feat(meta-tools): guide @mux to optimize minimal-first, expand on demand#170
its-mash wants to merge 1 commit into
mainfrom
feat/mux-minimal-first-optimization

Conversation

@its-mash

Copy link
Copy Markdown
Member

What

Makes @mux tool optimization faster by steering the model toward a lean, incremental strategy instead of an exhaustive upfront one.

Why

Optimizing was slow because the model would call mcpmux_list_all_tools (dumps the entire catalog — many servers, hundreds of tools), reason over all of it, and compose one large FeatureSet in a single shot. That's token-heavy and slow, and it over-curates.

Change (guidance only — no tool behavior changes)

  • Server instructions (mcp/handler.rs): add an explicit "start minimal and expand on demand" directive — search for just the tools the current task needs, compose a small FeatureSet, then grow it later (mcpmux_manage_feature_set action update + add) only as new needs arise. Don't over-curate; re-optimizing is cheap.
  • mcpmux_list_all_tools description: point to mcpmux_search_tools for the common case and flag the full dump as the most token-heavy read.
  • mcpmux_manage_feature_set description: prefer a small initial set expanded later over adding every candidate tool upfront.

Verification

clippy -D warnings, fmt, ESLint, typecheck all pass via pre-commit. No tests assert these strings (verified). The strings are model-facing guidance; effectiveness shows up as fewer/cheaper calls during @mux optimize.

Composing a toolset was slow because the model would dump the whole
catalog (mcpmux_list_all_tools), reason over all of it, then build one
large FeatureSet upfront. Steer it toward a lean, incremental strategy
in the guidance the model actually reads:

- Server instructions: add an explicit "start minimal and expand on
  demand" directive — search for just the tools the task needs, compose
  a small FeatureSet, then grow it later (manage_feature_set update +
  add) only as new needs arise. Don't over-curate; re-optimizing is
  cheap.
- mcpmux_list_all_tools description: point to mcpmux_search_tools for the
  common case; call out the full dump as the most token-heavy read.
- mcpmux_manage_feature_set description: prefer a small initial set
  expanded later over adding every candidate tool upfront.

Guidance-only; no behavior change to the tools themselves.

Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
@its-mash

Copy link
Copy Markdown
Member Author

Consolidated into #171 per request (single branch, trimmed descriptions).

@its-mash its-mash closed this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant