Enforce annotations for readOnlyHint and destructiveHint#1144
Open
geoffg-sentry wants to merge 3 commits into
Open
Enforce annotations for readOnlyHint and destructiveHint#1144geoffg-sentry wants to merge 3 commits into
geoffg-sentry wants to merge 3 commits into
Conversation
Member
|
so my only concern is the change to use_sentry thats agent mode and it wraps all tools - of which users explicitly select what tools they want. so us not allowing write tools there would actually be counter to the intent users select i think we should just make use_sentry always dangerous? to be fair, agent mode probably is gonna die as well. so we could consider just removing it at this point instead |
Contributor
Author
|
Yeah that makes sense, good justification on why we'd want move in that direction too. I'm going to drop user_sentry from /chat keepAnyway so the demo is fully read-only instead, |
Contributor
Author
|
And reverted that use_sentry change because we're just going to deprecate it afterward |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1143. Every catalog tool now declares complete MCP safety annotations, and this is enforced so gaps can't be reintroduced.
readOnlyHint,destructiveHint, andopenWorldHintare now required onToolConfig.annotations(each must be an explicittrue/false). A missing hint is now atscerror.destructiveHint: falseto every read-only tool (allfind_*/get_*/search_*/whoami, plussearch_sentry_tools). The write tools already declared both hints onmain; the gaps listed against3705c15were already fixed.tools.test.tsnow asserts all three hints are explicit booleans on every registered tool (not just whenreadOnlyHint === false) and that no tool is both read-only and destructive.docs/contributing/adding-tools.md, whose examples were teaching the incomplete pattern, to reflect the requirement.Will follow up afterwards to deprecate use_sentry since tool catalogs are our preferred way now.