• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 21512046602

30 Jan 2026 10:06AM UTC coverage: 60.459% (-0.04%) from 60.499%
21512046602

push

github

web-flow
Implement ExcludeAll feature for VirtualMCPServer tool filtering (#3499)

* Implement ExcludeAll feature for VirtualMCPServer tool filtering

Add runtime support for the excludeAll configuration fields that were
already defined in the CRD schema but not implemented:

- AggregationConfig.ExcludeAllTools (global): excludes all tools from
  all backends when true
- WorkloadToolConfig.ExcludeAll (per-workload): excludes all tools from
  a specific backend workload when true

The ExcludeAll check takes precedence over Filter and Overrides settings,
allowing users to easily exclude all tools from a backend without needing
to specify a non-matching filter workaround.

Changes:
- Add ExcludeAll check in processBackendTools (tool_adapter.go)
- Add excludeAllTools field and logic to defaultAggregator
- Update NewDefaultAggregator to accept *AggregationConfig instead of
  []*WorkloadToolConfig for better encapsulation
- Add comprehensive unit tests for both per-workload and global exclusion
- Update E2E test to use ExcludeAll instead of filter workaround
- Add new E2E test for global ExcludeAllTools feature

Fixes #2779

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add test for ExcludeAll preserving routing table for composite tools

When ExcludeAll is set on a backend's tools:
- Tools are NOT advertised to the LLM (excluded from tools/list)
- BUT tools ARE available in the routing table for composite tools to use

This enables the use case where you want to hide raw backend tools from
direct LLM access while still allowing curated composite tool workflows
to use those backend tools internally.

Implementation changes:
- ExcludeAll is now applied in MergeCapabilities (when building advertised
  tools list), not in QueryCapabilities or processBackendTools
- The routing table always contains ALL tools (after Filter/Overrides)
- Filter and Overrides are still applied in processBackendTools

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

----... (continued)

32 of 33 new or added lines in 2 files covered. (96.97%)

39 existing lines in 5 files now uncovered.

39368 of 65115 relevant lines covered (60.46%)

76.43 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.86
/pkg/transport/proxy/httpsse/http_proxy.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc