Conversation
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.
What
Several clearly additive write tools set
ReadOnlyHint: falsebut omitDestructiveHint, so the MCPToolAnnotationscontract defaults them todestructiveHint: true. Conservative clients then require extra approval forroutine operations like creating a branch or opening a pull request.
This adds an explicit
DestructiveHint: jsonschema.Ptr(false)to write toolsthat only create or add, following the existing pattern in the granular
toolsets.
Tools annotated
create_gistcreate_repositoryfork_repositorycreate_branchstar_repositorycreate_pull_requestadd_reply_to_pull_request_commentadd_comment_to_pending_reviewadd_issue_commentrequest_copilot_reviewcreate_repository_rulesetDeliberately left conservative
Tools that can overwrite or remove existing state, or whose behaviour depends
on the requested method, keep the conservative default:
update_gist,update_issue_comment— overwrite existing contentcreate_or_update_file,push_files— can overwrite filesmerge_pull_request— irreversibleupdate_pull_request_branch— can introduce conflictscustom_properties_write— last-write-wins on concurrent updatesunstar_repository,dismiss_notification,mark_all_notifications_read— remove or reset stateissue_write,update_pull_request,issue_dependency_write,sub_issue_write,pull_request_review_write— method-dependent, including destructive methodsTesting
go test ./pkg/github/...passes. Tool snapshots updated for the annotated tools.Fixes #3281