Skip to content

feat(mcp): list the coding surface by default and move maintenance tools into opt-in toolsets - #1442

Merged
skakri merged 2 commits into
mainfrom
feat/mcp-toolsets
Sep 23, 2026
Merged

skakri merged 2 commits into
mainfrom
feat/mcp-toolsets

Conversation

@skakri

@skakri skakri commented Sep 23, 2026

Copy link
Copy Markdown
Member

Second slice of #1440. Stacked on #1441.

Why. Every listed tool costs context in every agent that loads the list, and about a third of rag-rat's are maintenance or diagnostics an agent rarely calls while coding.

Toolsets (listing only — every tool stays callable and reachable through rag-rat tools):

  • admin: heal_index, memory_validate, memory_doctor, dream, dream_review, compare_graph_to_text, compare_graph_to_scip, check_library_usage, ffi_surface, llm_status, papertrail_sync_status.
  • graph: memory_edge_add, memory_edge_remove, memory_edges.
  • Enabled per repo with [mcp] toolsets = [...] (unknown names fail config load) or per launch with RAG_RAT_TOOLSETS — the only switch a dormant server has, and one a plugin launch can set.

index_status (stays listed) gains include: ["embeddings"], folding in the llm_status report. It already carried the papertrail block papertrail_sync_status returns — both call papertrail_status() — so that tool was a duplicate.

The dream-review skill tells the user how to enable admin when its tools aren't listed. docs/mcp-tools.md and the config reference document the toolsets.

Effect: the default list drops from 47 tools / 49.4 KB (after #1441) to 33 tools / 38.0 KB.

Tests (each mutation-checked): the default list excludes exactly the toolset tools and each toolset brings its own back; a real in-process tools/list is filtered; env and config toolsets merge, unknown env names skipped; [mcp] parsing dedupes and rejects unknown names; index_status includes embeddings only on request. MCP, CLI, base and core suites pass; clippy clean.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

SCIP oracle — resolution report

Heuristic→compiler edge resolution per corpus. Δ compares resolved-after to the main baseline (only when the corpus profile + tool version match).

corpus tool edges resolved (heuristic → compiler) precision recall monikers Δ vs main
c-libuv scip-clang 12894 37.9% → 48.6% 90.2% 55.3% 679 +0.0pp
cpp-yaml scip-clang 9423 43.2% → 72.9% 82.7% 41.0% 1055 +0.0pp
py-django scip-python 12937 28.8% → 73.5% 96.7% 84.1% 3701 +0.0pp
py-rich scip-python 8383 27.6% → 92.3% 95.0% 81.3% 1196 +0.0pp
rust-time rust-analyzer 11040 37.6% → 56.9% 82.2% 83.6% 574 +0.0pp
ts-rxjs scip-typescript 7875 39.6% → 94.9% 87.3% 77.4% 631 +0.0pp

resolved = Exact/Syntactic + compiler upgrades + resolved-external, over edge candidates with a callee range. precision/recall are the oracle eval metrics.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectrag-rat
Branchfeat/mcp-toolsets
Testbedhetzner-bigmem

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkEstimated Cyclescycles x 1e6Instructionsinstructions x 1e6L1 Hitshits x 1e6LL Hitshits x 1e6RAM Hitshits x 1e3Total read+writereads/writes x 1e6
rag_pipeline::pipeline::index cargo_resolver:resolver_config()📈 view plot
⚠️ NO THRESHOLD
1,920.91 x 1e6📈 view plot
⚠️ NO THRESHOLD
1,203.35 x 1e6📈 view plot
⚠️ NO THRESHOLD
1,681.19 x 1e6📈 view plot
⚠️ NO THRESHOLD
38.78 x 1e6📈 view plot
⚠️ NO THRESHOLD
1,309.79 x 1e3📈 view plot
⚠️ NO THRESHOLD
1,721.27 x 1e6
rag_pipeline::pipeline::query_cold cargo_resolver:resolver_built_config()📈 view plot
⚠️ NO THRESHOLD
316.43 x 1e6📈 view plot
⚠️ NO THRESHOLD
210.44 x 1e6📈 view plot
⚠️ NO THRESHOLD
299.40 x 1e6📈 view plot
⚠️ NO THRESHOLD
3.16 x 1e6📈 view plot
⚠️ NO THRESHOLD
34.73 x 1e3📈 view plot
⚠️ NO THRESHOLD
302.60 x 1e6
rag_pipeline::pipeline::query_warm cargo_resolver:resolver_index()📈 view plot
⚠️ NO THRESHOLD
238.35 x 1e6📈 view plot
⚠️ NO THRESHOLD
157.22 x 1e6📈 view plot
⚠️ NO THRESHOLD
224.24 x 1e6📈 view plot
⚠️ NO THRESHOLD
2.60 x 1e6📈 view plot
⚠️ NO THRESHOLD
31.04 x 1e3📈 view plot
⚠️ NO THRESHOLD
226.88 x 1e6
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectrag-rat
Branchfeat/mcp-toolsets
Testbedhetzner-bigmem
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
seconds (s)
(Result Δ%)
Upper Boundary
seconds (s)
(Limit %)
index_time/full_rebuild_cargo📈 view plot
🚷 view threshold
5.62 s
(-8.63%)Baseline: 6.15 s
7.20 s
(77.97%)
🐰 View full continuous benchmarking report in Bencher

…or_symbol's real arguments (#1441)

Refs #1440 (slice 1: schema hygiene, no renames).

- The `worktree` parameter description is repeated in every
  worktree-scoped tool's schema, so its 331 bytes were paid dozens of times
  in the tool list an agent loads. It is one sentence now; the full
  contract, including that an unknown path is ignored without error, is in
  docs/mcp-tools.md.
- `docs_for_symbol` advertised `resolution`, `include` and `edge_kinds`
  that its handler never read. It now takes the symbol selector (and `lang`,
  honoured like the other symbol tools), and its default limit matches them.
  The schema test had pinned the false arguments.
- The flattened symbol selector fields (`symbol`, `ref`, `id`,
  `allow_ambiguous`) carry one-line descriptions, so what a `sym_<hex>`
  handle is no longer lives only in prose.

The tool list drops from about 54.7 KB to 49.4 KB.
…ols into opt-in toolsets

Refs #1440 (slice 2).

Every tool in the list costs context in every agent that loads it, and
about a third of rag-rat's are maintenance or diagnostics an agent rarely
calls while coding. Two optional toolsets now carry them:

- admin: heal_index, memory_validate, memory_doctor, dream, dream_review,
  compare_graph_to_text, compare_graph_to_scip, check_library_usage,
  ffi_surface, llm_status, papertrail_sync_status;
- graph: memory_edge_add, memory_edge_remove, memory_edges.

Toolsets decide listing only: every tool stays callable and reachable
through `rag-rat tools`. They are enabled per repo with
`[mcp] toolsets = [...]` (unknown names fail config load) or per launch
with RAG_RAT_TOOLSETS, the only switch a dormant server has.

index_status, which stays listed, gains `include: ["embeddings"]` to fold
in the llm_status report; it already carries the papertrail cache block
papertrail_sync_status returns, so that tool was a duplicate.

The dream-review skill tells the user how to enable the admin toolset when
its tools are not listed.
@skakri
skakri merged commit 180372d into main Sep 23, 2026
20 of 21 checks passed
@skakri
skakri deleted the feat/mcp-toolsets branch September 23, 2026 20:09
@skakri skakri mentioned this pull request Sep 23, 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