Skip to content

Conversation

@ardaguclu
Copy link
Member

@ardaguclu ardaguclu commented Jul 1, 2025

Fixes #156

This PR introduces enabled/disabled tool list in the configuration file.

Users will be able to add enabled and disabled tools in the configuration file. e.g.

enabled_tools = ["configuration_view", "events_list", "namespaces_list", "pods_list", "resources_list", "resources_get", "resources_create_or_update", "resources_delete"]
disabled_tools = ["pods_delete", "pods_top", "pods_log", "pods_run", "pods_exec"]

This list will be applied to the given profile (full is the default);

  • If enabled list is empty, all the tools given in the profile will be populated
  • If enabled list is not empty, only the enabled tools will be populated
  • If disabled list is not empty, specifically disabled tools will be removed from the tool list.

This PR partially fixes #151

In a follow up PR, I'll add validations to prevent duplicate entries in both enable and disabled list.

@ardaguclu
Copy link
Member Author

/cc @manusa
I don't want to cause any merge conflicts with your #149. We can wait to merge this #149 first

@manusa
Copy link
Member

manusa commented Jul 1, 2025

Currently implementing your review suggestions. Will ping you there when ready for a last review

SSEBaseURL string `toml:"sse_base_url,omitempty"`
KubeConfig string `toml:"kubeconfig,omitempty"`
ListOutput string `toml:"list_output,omitempty"`
ReadOnly bool `toml:"read_only,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be good to move the description comment here since to clarify its purpose:

// When true, expose only tools annotated with readOnlyHint=true

Same for DisableDestructive

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. I'll add these comments.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.

Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

LGTM, however, I think I'd rename allowed_tools to enabled_tools and denied_tools to disabled_tools.

@manusa manusa added this to the 0.1.0 milestone Jul 1, 2025 — with automated-tasks
@ardaguclu
Copy link
Member Author

LGTM, however, I think I'd rename allowed_tools to enabled_tools and denied_tools to disabled_tools.

enabled/disabled is more descriptive than allowed/denied. I'll update with that.

@ardaguclu ardaguclu changed the title Introduce allow/deny tool list in configuration file Introduce enabled/disabled tool list in configuration file Jul 1, 2025
Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

LGTM, thx!

@manusa manusa merged commit 186f445 into containers:main Jul 1, 2025
5 checks passed
@ardaguclu ardaguclu deleted the allow-deny-tools branch July 1, 2025 14:04
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.

Enabled and Disabled tools configuration Adding namespace and tools control arguments

2 participants