- Notifications
You must be signed in to change notification settings - Fork3.2k
feat: Add DestructiveHint to delete_project_item tool annotation#1665
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
feat: Add DestructiveHint to delete_project_item tool annotation#1665
Conversation
Add DestructiveHint: true to the delete_project_item tool to beconsistent with other delete operations (delete_file anddelete_workflow_run_logs) that properly indicate destructive behavior.This helps LLMs better understand that this tool permanently removesdata and should be used with appropriate caution.Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull request overview
This PR adds theDestructiveHint: true annotation to thedelete_project_item tool to properly indicate its destructive behavior, maintaining consistency with other delete operations in the codebase likedelete_file anddelete_workflow_run_logs.
Key Changes:
- Added
DestructiveHint: jsonschema.Ptr(true)todelete_project_itemtool annotations - Aligned annotation field formatting for consistency (Title, ReadOnlyHint, DestructiveHint)
| Title:t("TOOL_DELETE_PROJECT_ITEM_USER_TITLE","Delete project item"), | ||
| ReadOnlyHint:false, | ||
| DestructiveHint:jsonschema.Ptr(true), |
CopilotAIDec 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The toolsnap file for delete_project_item needs to be updated to reflect the addition of DestructiveHint. After making this code change, you need to run UPDATE_TOOLSNAPS=true go test ./... to update the snapshot file at pkg/github/toolsnaps/delete_project_item.snap. The snapshot should include "destructiveHint": true in the annotations object, similar to delete_file.snap and delete_workflow_run_logs.snap. The updated snapshot file must be committed along with this code change.
Add destructiveHint: true to the snapshot file to match the code change.🤖 Generated with [Claude Code](https://claude.com/claude-code)Co-Authored-By: Claude <noreply@anthropic.com>
triepod-ai commentedDec 21, 2025
Thanks for the review feedback! I've run The snapshot at |
Summary
Adds
DestructiveHint: trueannotation to thedelete_project_itemtool to be consistent with other delete operations that properly indicate destructive behavior.Changes
DestructiveHint: jsonschema.Ptr(true)todelete_project_itemtool inpkg/github/projects.goWhy This Matters
The
delete_project_itemtool permanently removes a project item, making it a destructive operation. Other delete tools in the codebase (delete_file,delete_workflow_run_logs) correctly have this annotation set. This ensures LLMs receive consistent semantic metadata about tool behavior:delete_fileReadOnlyHint: false, DestructiveHint: true✅delete_workflow_run_logsReadOnlyHint: false, DestructiveHint: true✅delete_project_itemReadOnlyHint: false❌ →FixedTesting
jsonschema.Ptr(true)pattern as other destructive tools🤖 Generated withClaude Code