Plugin Directory

Changeset 3777876


Ignore:
Timestamp:
11/01/2026 10:52:56 AM (12 hours ago)
Author:
capoeira314
Message:

Release 0.9.2: tool annotations

Location:
simonov-ai-site-manager
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • simonov-ai-site-manager/tags/0.9.2/includes/class-tool-registry.php

    r3777746 r3777876  
    111111
    112112        /**
     113         * Writes that only add something new and never overwrite or remove.
     114         *
     115         * MCP assumes a write is destructive unless told otherwise, and that is the
     116         * right default here too: update_* replaces what was there, set_* and
     117         * assign_* swap one value for another. Only the tools named below are
     118         * reported as additive.
     119         *
     120         * @var string[]
     121         */
     122        private static $additive_tools = array(
     123                'create_comment',
     124                'create_post',
     125                'create_term',
     126                'pll_create_translation',
     127                'upload_media_base64',
     128                'upload_media_from_url',
     129                'wc_create_product',
     130        );
     131
     132        /**
     133         * MCP tool annotations, derived from the same classification read-only
     134         * mode uses, so the hint a client sees can never disagree with what the
     135         * server enforces.
     136         *
     137         * Clients use these to decide what to run without asking the user first;
     138         * ChatGPT, for one, asks before calling tools not marked read-only.
     139         *
     140         * @param string $name Tool name.
     141         * @return array
     142         */
     143        public function annotations( $name ) {
     144                if ( ! $this->is_write( $name ) ) {
     145                        return array(
     146                                'readOnlyHint'  => true,
     147                                'openWorldHint' => false,
     148                        );
     149                }
     150                return array(
     151                        'readOnlyHint'    => false,
     152                        'destructiveHint' => ! in_array( (string) $name, self::$additive_tools, true ),
     153                        // Fetching from a URL is the one tool that reaches beyond this site.
     154                        'openWorldHint'   => 'upload_media_from_url' === $name,
     155                );
     156        }
     157
     158        /**
    113159         * Is the server restricted to reads?
    114160         *
    … …  
    175221                                'description' => $def['description'],
    176222                                'inputSchema' => $def['inputSchema'],
     223                                'annotations' => $this->annotations( $name ),
    177224                        );
    178225                }
  • simonov-ai-site-manager/tags/0.9.2/readme.txt

    r3777794 r3777876  
    55Tested up to: 7.1
    66Requires PHP: 7.0
    7 Stable tag: 0.9.1
     7Stable tag: 0.9.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    97974. In a chat, open the "+" menu, choose developer mode and select your site.
    9898
    99 ChatGPT may ask you to confirm a tool call before running it. Read what it is about to do before you confirm.
     99Tools that only read run straight away. Before anything that changes the site, ChatGPT asks you to confirm. Read what it is about to do before you confirm.
    100100
    101101= Connect Claude Code =
    … …  
    169169* Every tool enforces WordPress capabilities against the specific object it touches — not just a generic capability — so a non-admin configured user cannot edit content it does not own.
    170170* No tool changes plugins, themes, users or site settings.
    171 * Option reads refuse anything that looks like a credential (API keys, SMTP passwords, salts).
    172171* Media uploads validate file content against the extension and block fetches to internal/cloud-metadata addresses.
    173172* Disable individual tools from the settings page if you want to reduce surface area.
    … …  
    181180== Changelog ==
    182181
     182= 0.9.2 =
     183* Every tool now tells the client whether it only reads, adds something new, or can overwrite or delete. ChatGPT and other clients run reading tools without asking and ask before changes.
     184
    183185= 0.9.1 =
    184186* MCP requests never hold administrative capabilities, whichever account is connected.
  • simonov-ai-site-manager/tags/0.9.2/simonov-ai-site-manager.php

    r3777746 r3777876  
    44 * Plugin URI:        https://github.com/yuo2007/simonov-ai-site-manager
    55 * Description:        Free, open Model Context Protocol (MCP) server for WordPress. Lets Claude, ChatGPT and other MCP clients manage posts, media, taxonomies, comments, WooCommerce and Polylang translations.
    6  * Version:           0.9.1
     6 * Version:           0.9.2
    77 * Requires at least: 5.8
    88 * Requires PHP:      7.0
    … …  
    2020defined( 'ABSPATH' ) || exit;
    2121
    22 define( 'WPMCP_VERSION', '0.9.1' );
     22define( 'WPMCP_VERSION', '0.9.2' );
    2323define( 'WPMCP_FILE', __FILE__ );
    2424define( 'WPMCP_DIR', plugin_dir_path( __FILE__ ) );
  • simonov-ai-site-manager/trunk/includes/class-tool-registry.php

    r3777746 r3777876  
    111111
    112112        /**
     113         * Writes that only add something new and never overwrite or remove.
     114         *
     115         * MCP assumes a write is destructive unless told otherwise, and that is the
     116         * right default here too: update_* replaces what was there, set_* and
     117         * assign_* swap one value for another. Only the tools named below are
     118         * reported as additive.
     119         *
     120         * @var string[]
     121         */
     122        private static $additive_tools = array(
     123                'create_comment',
     124                'create_post',
     125                'create_term',
     126                'pll_create_translation',
     127                'upload_media_base64',
     128                'upload_media_from_url',
     129                'wc_create_product',
     130        );
     131
     132        /**
     133         * MCP tool annotations, derived from the same classification read-only
     134         * mode uses, so the hint a client sees can never disagree with what the
     135         * server enforces.
     136         *
     137         * Clients use these to decide what to run without asking the user first;
     138         * ChatGPT, for one, asks before calling tools not marked read-only.
     139         *
     140         * @param string $name Tool name.
     141         * @return array
     142         */
     143        public function annotations( $name ) {
     144                if ( ! $this->is_write( $name ) ) {
     145                        return array(
     146                                'readOnlyHint'  => true,
     147                                'openWorldHint' => false,
     148                        );
     149                }
     150                return array(
     151                        'readOnlyHint'    => false,
     152                        'destructiveHint' => ! in_array( (string) $name, self::$additive_tools, true ),
     153                        // Fetching from a URL is the one tool that reaches beyond this site.
     154                        'openWorldHint'   => 'upload_media_from_url' === $name,
     155                );
     156        }
     157
     158        /**
    113159         * Is the server restricted to reads?
    114160         *
    … …  
    175221                                'description' => $def['description'],
    176222                                'inputSchema' => $def['inputSchema'],
     223                                'annotations' => $this->annotations( $name ),
    177224                        );
    178225                }
  • simonov-ai-site-manager/trunk/readme.txt

    r3777794 r3777876  
    55Tested up to: 7.1
    66Requires PHP: 7.0
    7 Stable tag: 0.9.1
     7Stable tag: 0.9.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    97974. In a chat, open the "+" menu, choose developer mode and select your site.
    9898
    99 ChatGPT may ask you to confirm a tool call before running it. Read what it is about to do before you confirm.
     99Tools that only read run straight away. Before anything that changes the site, ChatGPT asks you to confirm. Read what it is about to do before you confirm.
    100100
    101101= Connect Claude Code =
    … …  
    169169* Every tool enforces WordPress capabilities against the specific object it touches — not just a generic capability — so a non-admin configured user cannot edit content it does not own.
    170170* No tool changes plugins, themes, users or site settings.
    171 * Option reads refuse anything that looks like a credential (API keys, SMTP passwords, salts).
    172171* Media uploads validate file content against the extension and block fetches to internal/cloud-metadata addresses.
    173172* Disable individual tools from the settings page if you want to reduce surface area.
    … …  
    181180== Changelog ==
    182181
     182= 0.9.2 =
     183* Every tool now tells the client whether it only reads, adds something new, or can overwrite or delete. ChatGPT and other clients run reading tools without asking and ask before changes.
     184
    183185= 0.9.1 =
    184186* MCP requests never hold administrative capabilities, whichever account is connected.
  • simonov-ai-site-manager/trunk/simonov-ai-site-manager.php

    r3777746 r3777876  
    44 * Plugin URI:        https://github.com/yuo2007/simonov-ai-site-manager
    55 * Description:        Free, open Model Context Protocol (MCP) server for WordPress. Lets Claude, ChatGPT and other MCP clients manage posts, media, taxonomies, comments, WooCommerce and Polylang translations.
    6  * Version:           0.9.1
     6 * Version:           0.9.2
    77 * Requires at least: 5.8
    88 * Requires PHP:      7.0
    … …  
    2020defined( 'ABSPATH' ) || exit;
    2121
    22 define( 'WPMCP_VERSION', '0.9.1' );
     22define( 'WPMCP_VERSION', '0.9.2' );
    2323define( 'WPMCP_FILE', __FILE__ );
    2424define( 'WPMCP_DIR', plugin_dir_path( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.