Skip to content

Add ability to disable tools - #116

Open
satur9nine wants to merge 1 commit into
Aas-ee:mainfrom
satur9nine:limit-tools
Open

Add ability to disable tools#116
satur9nine wants to merge 1 commit into
Aas-ee:mainfrom
satur9nine:limit-tools

Conversation

@satur9nine

Copy link
Copy Markdown

No description provided.

@Ebola-Chan-bot Ebola-Chan-bot 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.

这个设计在与已有的环境变量重命名机制共存条件下就显得太臃肿了。建议改成,要禁用一个工具,就将其对应环境变量设为非法值或保留关键字,如"<disabled>""null",之类的,避免任何容易出错的名称问题,也不需要再增添新的环境变量。
不过在“只希望允许个别工具”的场景下,新增一个环境变量可能确实让配置更简洁。值得讨论。 @Aas-ee

@Ebola-Chan-bot
Ebola-Chan-bot dismissed their stale review August 22, 2026 06:24

不一定需要修改,先讨论一下

Use "null" or "<disabled>" as the tool name to disable it.
@satur9nine satur9nine changed the title Limit visible tools with ENABLED_TOOLS Add ability to disable tools Aug 22, 2026
@satur9nine

satur9nine commented Aug 22, 2026

Copy link
Copy Markdown
Author

Your feedback is appreciated, I have updated the change to use the sentinel string "null" or "<disabled>" to disable the tool.

@Ebola-Chan-bot Ebola-Chan-bot 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.

After discussions with other maintainers, we decided to allow only <disabled> as the tool disable flag, and not to include the ambiguous null or other invalid names. In other words, tool disabling is only indicated when and only when the tool name is precisely set to <disabled>, the reserved keyword; other illegal names should only be warned and fallbacked to standard names, instead of disabling that tool.
Also better if provide examples in the README.

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