Skip to content

feat(registry): version-gated tool registration via InstanceCapabilities layerΒ #445

@polaz

Description

@polaz

πŸ‘ 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:

  1. Detect instance version at bootstrap (already done β€” ConnectionManager.isFeatureAvailable)
  2. Expose a clean InstanceCapabilities map (version, tier, admin, scopes)
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature, new MCP tool, new capability

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions