Skip to content

Introduce enabled/disabled tool list in configuration file #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 1, 2025

Conversation

ardaguclu
Copy link
Contributor

@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
Contributor 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
Owner

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
Owner

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
Contributor 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
Contributor Author

Choose a reason for hiding this comment

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

Updated.

Copy link
Owner

@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
Contributor 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
Owner

@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 manusa: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