get-react-native-stable-version
Retrieve the latest stable React Native version from GitHub releases to ensure compatibility and guide upgrade planning. Use this version for production-ready applications and as input for further upgrade tools.
Instructions
Gets the latest stable version of React Native from GitHub releases.
This version represents the most recent production-ready release that has been thoroughly tested and is recommended for use in applications.
The version number follows semantic versioning (e.g. 0.72.0) and excludes any release candidates or beta versions.
This tool is commonly used before planning an upgrade to ensure targeting the latest stable release and must be called before calling get-react-native-diff tool.
The output of this tool will be used as the toVersion parameter in the get-react-native-diff tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:36-60 (registration)Tool registration for 'get-stable-version', which retrieves the latest stable React Native version. Note: This appears to be the tool matching the query 'get-react-native-stable-version' as no exact match was found, and this tool specifically handles React Native stable versions.server.registerTool('get-stable-version', { title: "Get Stable Version", description: `Gets the latest stable version of React Native from GitHub releases. OVERVIEW: This version represents the most recent production-ready release that has been thoroughly tested and is recommended for use in applications. VERSION FORMAT: • The version number follows semantic versioning (e.g. 0.72.0) • Excludes any release candidates or beta versions USAGE: • This tool is commonly used before planning an upgrade to ensure targeting the latest stable release • Must be called before calling get-react-native-diff tool • The output of this tool will be used as the toVersion parameter in the get-react-native-diff tool`, }, async () => { const version = await getStableVersion(); return { content: [{ type: "text", text: version }] } } );
- src/services.ts:5-9 (handler)Core handler logic that fetches the latest stable React Native version from the GitHub API for facebook/react-native repository.export const getStableVersion = async () => { const response = await fetch(`https://api.github.com/repos/facebook/react-native/releases/latest`); const data = await response.json() as { tag_name: string }; return data.tag_name.replace('v', ''); }
- src/tools.ts:3-3 (helper)Import of the getStableVersion helper function used by the tool handler.import { getCurrentReleaseCandidateVersion, getDiff, getStableVersion } from "./services";
- src/server.ts:17-17 (registration)Invocation of tool registration in the MCP server setup.registerTools(server);