You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add granular MCP tool annotations for destructive and idempotent hints
Refactor Abilities to separate core annotations (readonly, destructive, idempotent) from MCP protocol hints (readOnlyHint, destructiveHint, idempotentHint), and expose both via a new meta_annotations field.
Add an optional $annotations parameter to add_ability() so callers can override defaults per-tool. Apply destructive=true and idempotent=true to delete operations across all tool files, and idempotent=true to update/activate/save operations where appropriate.
Extend tests/run.php to assert correct annotation values on both MCP tool hints and registered ability meta.
Copy file name to clipboardExpand all lines: src/Tools/ContentManagementTools.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -145,6 +145,6 @@ private function add_content_abilities() {
145
145
}, false );
146
146
$this->add_ability( self::INTERNAL_PREFIX . 'content-delete', 'Delete Content', 'Delete content from any registered post type', $delete_content_schema, function ( $params ) {
Copy file name to clipboardExpand all lines: src/Tools/GlobalStylesTools.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ private function add_style_abilities() {
36
36
}, true, 'edit_theme_options' );
37
37
$this->add_ability( self::INTERNAL_PREFIX . 'global-styles-update', 'Update Global Styles', 'Update a global styles configuration', $update_schema, function ( $params ) {
$this->add_ability( self::INTERNAL_PREFIX . 'global-styles-active-get', 'Get Active Global Styles', 'Get the currently active global styles for the current theme', $this->schema(), function () {
$this->add_ability( self::INTERNAL_PREFIX . 'media-search', 'Search Media', 'Search WordPress media by title, caption, or description', $list_schema, function ( $params ) {
@@ -78,7 +78,7 @@ private function add_site_abilities() {
78
78
}, true, 'manage_options' );
79
79
$this->add_ability( self::INTERNAL_PREFIX . 'general-settings-save', 'Save General Settings', 'Save WordPress general site settings', $settings_schema, function ( $params ) {
Copy file name to clipboardExpand all lines: src/Tools/TaxonomyTools.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ private function add_taxonomy_abilities() {
79
79
80
80
$this->add_ability( self::INTERNAL_PREFIX . 'taxonomy-term-delete', 'Delete Taxonomy Term', 'Delete a term from a registered taxonomy', $term_get_schema, function ( $params ) {
0 commit comments