Part of #4859.
Motivation
The server will grow from 10 to potentially 16+ tools; flat tool lists degrade model tool-selection accuracy. A configurable profile (e.g. rag: query, vector_search, hybrid_search, full_text_search, sample_records, schema resource vs. admin: the current 10 operator tools) lets a given agent see a focused set. This isn't a new tool, so the four-justification test from #4859 doesn't directly apply — it's the Epic's explicit alternative to unbounded tool-list growth.
Proposed design
- Add
profile (or enabledTools allowlist) field to MCPConfiguration, default all (backward-compatible — no behavior change for existing deployments).
tools/list and tools/call in both transports filter/reject against the active profile — a tools/call for a tool outside the active profile is denied even though it's globally registered (defense in depth, not just a UI filter).
- Expose profile selection via
MCPConfigHandler.java's existing admin config surface.
- Update
MCPConfigurationTest/MCPPermissionsTest for profile filtering.
Acceptance criteria
Files to touch
MCPConfiguration.java, MCPHttpHandler.java, MCPStdioServer.java, MCPConfigHandler.java, tests, docs.
Dependencies
Soft-depends on #4860, #4861, #4862, #4863, #4864 for the rag profile's tool list to be meaningful; the filtering mechanism itself can be built in parallel with default all/admin profiles only, then extended once new tool names land.
Effort estimate
M — config schema change, filtering logic duplicated across two transports, admin surface update.
Part of #4859.
Motivation
The server will grow from 10 to potentially 16+ tools; flat tool lists degrade model tool-selection accuracy. A configurable profile (e.g.
rag:query,vector_search,hybrid_search,full_text_search,sample_records, schema resource vs.admin: the current 10 operator tools) lets a given agent see a focused set. This isn't a new tool, so the four-justification test from #4859 doesn't directly apply — it's the Epic's explicit alternative to unbounded tool-list growth.Proposed design
profile(orenabledToolsallowlist) field toMCPConfiguration, defaultall(backward-compatible — no behavior change for existing deployments).tools/listandtools/callin both transports filter/reject against the active profile — atools/callfor a tool outside the active profile is denied even though it's globally registered (defense in depth, not just a UI filter).MCPConfigHandler.java's existing admin config surface.MCPConfigurationTest/MCPPermissionsTestfor profile filtering.Acceptance criteria
all) preserves current behavior exactly (regression-tested).ragandadminprofiles defined and enforced in bothtools/listandtools/call.mcp-config.jsonlike existing fields.rag.Files to touch
MCPConfiguration.java,MCPHttpHandler.java,MCPStdioServer.java,MCPConfigHandler.java, tests, docs.Dependencies
Soft-depends on #4860, #4861, #4862, #4863, #4864 for the
ragprofile's tool list to be meaningful; the filtering mechanism itself can be built in parallel with defaultall/adminprofiles only, then extended once new tool names land.Effort estimate
M — config schema change, filtering logic duplicated across two transports, admin surface update.