Skip to content

feat: --read-only flag to disable write tools#28

Open
kskarthik wants to merge 1 commit intomainfrom
disable-components
Open

feat: --read-only flag to disable write tools#28
kskarthik wants to merge 1 commit intomainfrom
disable-components

Conversation

@kskarthik
Copy link
Collaborator

@kskarthik kskarthik commented Mar 13, 2026

Introduces a new --read-only command-line flag. When set to this flag, disables all tools that can modify bug states, ensuring the server operates in a read-only capacity.

Introduces a new `--read-only` command-line flag. When set to true, this
flag disables all tools that can modify bug states, ensuring the server
operates in a read-only capacity.
@kskarthik
Copy link
Collaborator Author

@lemenkov JFYI

This feature filters the methods which modify a bug via tool tags property. In case, you want to add more tools which alter bugs, please keep that in mind.

Also, this feature overlaps with the MCP_BUGZILLA_DISABLED_METHODS

currently, my thought is:

  1. check if MCP_BUGZILLA_DISABLED_METHODS  is set,
  2. if yes, do not call the disable_write_components function

This way it is simpler and easier for user & us to maintain. don't let the user mix both options

@kskarthik
Copy link
Collaborator Author

Surprisingly, having both options does not have any side effects in the program.

Maybe we can allow it side by side. Let me test it further,

@lemenkov
Copy link
Contributor

Both methods looks good (env-var and cli switch). Although MCP_BUGZILLA_DISABLED_METHODS looks more fine-grained I really don't see a reason to selectively disable any RO-methods. From my understanding disabling RW-methods makes much more sense in some configurations while selecting RO-metholds doesn't add up. But anyway I'm fine with both approaches.

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