register( 'diagnostics_run', array( 'description' => 'Run environment diagnostics for MCP troubleshooting.', 'domain' => 'core', 'capability' => 'manage_options', 'inputSchema' => array( 'type' => 'object', 'properties' => array() ), ), function () { global $wp_version; return array( 'php' => array( 'version' => PHP_VERSION, 'memory_limit'=> ini_get( 'memory_limit' ), 'max_execution_time' => ini_get( 'max_execution_time' ), ), 'wordpress' => array( 'version' => $wp_version, 'multisite' => is_multisite(), 'debug' => defined( 'WP_DEBUG' ) && WP_DEBUG, ), 'mcp' => array( 'endpoint' => rest_url( AGENTDESK_REST_NAMESPACE . AGENTDESK_MCP_ROUTE ), 'safe_mode' => Agentdesk_Security::is_safe_mode(), 'power_mode' => Agentdesk_Security::is_power_mode(), 'tool_count' => count( Agentdesk_Registry::instance()->all() ), ), 'extensions' => array( 'woocommerce' => class_exists( 'WooCommerce' ), 'elementor' => defined( 'ELEMENTOR_VERSION' ), 'acf' => class_exists( 'ACF' ), ), ); } ); } );