get_version
Check the current version of the Optimizely DXP MCP Server and verify if updates are available from the NPM registry.
Instructions
📌 Get current MCP server version and update availability. REAL-TIME: <1s. Checks local version against NPM registry for updates. Use this to verify you have latest features and bug fixes. Returns current version, latest available version, and update available flag. Suggests npm update command if outdated.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- lib/utils/tool-availability-matrix.ts:346-350 (registration)Registration of the 'get_version' tool in the tool availability matrix, available for all hosting types with description 'Get MCP server version information''get_version': { hostingTypes: ['dxp-paas', 'dxp-saas', 'self-hosted', 'unknown'], category: 'Support', description: 'Get MCP server version information' },
- lib/audit-logger.js:22-29 (handler)Handler function getVersion() that reads and returns the MCP server version from package.json or 'unknown' if failedgetVersion() { try { const pkg = require('../package.json'); return pkg.version; } catch (error) { return 'unknown'; } }
- lib/version-check.ts:29-55 (helper)Version checker that gets current version from package.json and checks for updates, likely related to version tool logicstatic async checkForUpdates(): Promise<UpdateInfo | null> { try { const currentVersion: string = packageJson.version; const packageName: string = packageJson.name; // Check npm registry for latest version const latestVersion = await this.getLatestVersion(packageName); if (latestVersion && this.isNewerVersion(currentVersion, latestVersion)) { return { updateAvailable: true, currentVersion, latestVersion, updateCommand: `npm install -g ${packageName}@latest` }; } return { updateAvailable: false, currentVersion }; } catch (error) { // Silently fail - don't interrupt the user's workflow console.error('Version check failed:', (error as Error).message); return null; } }