| @@ -1,8 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace Elementor\Modules\Mcp\Abilities; |
| 4 | 4 | |
| 5 | +use Elementor\MCP\Composer\Admin\McpSettingsController; | |
| 5 | 6 | use Elementor\Modules\Mcp\Utils\Editor_Sync_State; |
| 6 | 7 | use Elementor\Modules\Mcp\Utils\Mcp_V4_Gate; |
| 7 | 8 | |
| 8 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -60,9 +61,9 @@ | ||
| 60 | 61 | $definition['description'] = $this->get_description_for_llm(); |
| 61 | 62 | |
| 62 | 63 | $meta = is_array( $definition['meta'] ?? null ) ? $definition['meta'] : []; |
| 63 | 64 | $mcp = is_array( $meta['mcp'] ?? null ) ? $meta['mcp'] : []; |
| 64 | - $mcp['public'] = true; | |
| 65 | + $mcp['public'] = McpSettingsController::is_enabled(); | |
| 65 | 66 | if ( isset( $mcp['description'] ) ) { |
| 66 | 67 | $mcp['description'] = $this->maybe_append_unavailable_notice( (string) $mcp['description'] ); |
| 67 | 68 | } |
| 68 | 69 | $meta['mcp'] = $mcp; |