π React to this issue if you need this feature β helps us prioritise.
Problem
Several GitLab features are version-dependent (active filter β₯18.5, group restore β₯18.0, future ones in 19.x). Today our registry registers all tools unconditionally β call-time the request fails on older instances with an opaque API error. We should:
- Detect instance version at bootstrap (already done β
ConnectionManager.isFeatureAvailable)
- Expose a clean
InstanceCapabilities map (version, tier, admin, scopes)
- Either skip tool registration OR mark tool with min-version metadata that registry filters honour
Investigation done (current state)
Verified:
- β
services/GitLabVersionDetector.ts:284 has isFeatureAvailable framework β used in 15 places (grep -rn 'getTier\|isFeatureAvailable' src/)
- β
ConnectionManager.getInstanceInfo() returns version + tier β caller can decide
- β οΈ But version-gating is scattered: each handler does its own
isFeatureAvailable call. No single InstanceCapabilities blob the registry uses to filter the entire tool list
- β No tool is filtered OUT of the catalog on older instances β they just fail at call time
Re-verify before coding:
grep -rn 'isFeatureAvailable' src/ | head -20
grep -rn 'InstanceCapabilities\|getInstanceCapabilities' src/
Acceptance criteria
Estimate
1d
Context
Found during GitLab 18β19 API landscape analysis. Foundational work that prevents repeated version-gating boilerplate across handlers.
π React to this issue if you need this feature β helps us prioritise.
Problem
Several GitLab features are version-dependent (
activefilter β₯18.5, group restore β₯18.0, future ones in 19.x). Today our registry registers all tools unconditionally β call-time the request fails on older instances with an opaque API error. We should:ConnectionManager.isFeatureAvailable)InstanceCapabilitiesmap (version, tier, admin, scopes)Investigation done (current state)
Verified:
services/GitLabVersionDetector.ts:284hasisFeatureAvailableframework β used in 15 places (grep -rn 'getTier\|isFeatureAvailable' src/)ConnectionManager.getInstanceInfo()returns version + tier β caller can decideisFeatureAvailablecall. No singleInstanceCapabilitiesblob the registry uses to filter the entire tool listRe-verify before coding:
Acceptance criteria
services/InstanceCapabilities.tsaggregating: version (semver), tier (free/premium/ultimate), isAdmin, adminModeActive (feat(context): probe admin_mode elevation and expose in whoamiΒ #434), token scopesisFeatureAvailablelookups)registry-manager.tsconsults it duringgetAllToolDefinitions()to filter out tools whoseminVersion/requiresAdmin/requiresTieraren't met{minGitLabVersion: '18.5'})tools/list_changednotification when capabilities are re-detected (e.g. afterswitch_profile)Estimate
1d
Context
Found during GitLab 18β19 API landscape analysis. Foundational work that prevents repeated version-gating boilerplate across handlers.