Skip to content

refactor(mcp): clean up multi-target naming and tests after PR #843#942

Merged
matzew merged 1 commit into
containers:mainfrom
marcnuri-forks:refactor/cleanup-multi-target-naming
Mar 20, 2026
Merged

refactor(mcp): clean up multi-target naming and tests after PR #843#942
matzew merged 1 commit into
containers:mainfrom
marcnuri-forks:refactor/cleanup-multi-target-naming

Conversation

@manusa

@manusa manusa commented Mar 20, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up cleanup to #843 addressing naming inconsistencies, missing documentation,
and redundant tests left over from the enum removal.

  • Rename isMultiCluster parameter to isMultiTarget for consistency with the
    Provider.IsMultiTarget() interface method
  • Add godoc to IsMultiTarget() clarifying its relationship to GetTargets and
    intended implementation contract
  • Remove toolsets-full-tools-multicluster-enum.json testdata and
    TestDefaultToolsetsToolsInMultiClusterEnum (identical to the multicluster test
    after enum removal in refactor(kubernetes)!: provider.GetTargets is optionally user scoped now #843)
  • Fix TestClusterAwareTool to use mutator return value instead of relying on
    shared pointer side effects
  • Remove redundant TestClusterAwareToolMultipleClusters (identical to
    TestClusterAwareTool after enum removal)

@manusa manusa added this to the 0.1.0 milestone Mar 20, 2026
…ners#843

- Rename isMultiCluster to isMultiTarget for consistency with
  the Provider.IsMultiTarget() interface method
- Add godoc to IsMultiTarget() explaining its relationship to
  GetTargets and intended implementation contract
- Remove redundant multicluster-enum testdata and test (enum
  behavior was removed in containers#843, making it identical to the
  multicluster test)
- Fix TestClusterAwareTool to use mutator return value instead
  of relying on shared pointer side effects
- Remove redundant TestClusterAwareToolMultipleClusters (now
  identical to TestClusterAwareTool after enum removal)

Signed-off-by: Marc Nuri <marc@marcnuri.com>
@manusa
manusa force-pushed the refactor/cleanup-multi-target-naming branch from 6e62062 to a253b07 Compare March 20, 2026 09:00
Comment thread pkg/mcp/tool_filter.go
}

func ShouldIncludeTargetListTool(targetName string, isMultiCluster bool) ToolFilter {
func ShouldIncludeTargetListTool(targetName string, isMultiTarget bool) ToolFilter {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@matzew matzew left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matzew
matzew merged commit 8ace728 into containers:main Mar 20, 2026
14 of 15 checks passed
@manusa
manusa deleted the refactor/cleanup-multi-target-naming branch March 20, 2026 10:19
matzew pushed a commit to matzew/kubernetes-mcp-server that referenced this pull request Mar 24, 2026
…ners#843 (containers#942)

- Rename isMultiCluster to isMultiTarget for consistency with
  the Provider.IsMultiTarget() interface method
- Add godoc to IsMultiTarget() explaining its relationship to
  GetTargets and intended implementation contract
- Remove redundant multicluster-enum testdata and test (enum
  behavior was removed in containers#843, making it identical to the
  multicluster test)
- Fix TestClusterAwareTool to use mutator return value instead
  of relying on shared pointer side effects
- Remove redundant TestClusterAwareToolMultipleClusters (now
  identical to TestClusterAwareTool after enum removal)

Signed-off-by: Marc Nuri <marc@marcnuri.com>
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.

2 participants