arbos_version
Retrieve the ArbOS version number for any Arbitrum chain, including Xai, Arbitrum One, or Nova, to verify system compatibility and monitor chain specifications.
Instructions
Get the ArbOS version number for any Arbitrum chain. Use this for questions like 'what ArbOS version is Xai running?', 'ArbOS version of Arbitrum One', 'what version of ArbOS', or 'check ArbOS version'. Supports chain names like 'Xai', 'Arbitrum One', 'Nova', etc.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rpcUrl | No | The RPC URL of the Arbitrum node (optional if default is set) | |
| chainName | No | Chain name (e.g., 'Xai', 'Arbitrum One', 'Nova') - will auto-resolve to RPC URL |
Implementation Reference
- src/index.ts:202-216 (handler)Handler logic for the 'arbos_version' MCP tool. Resolves RPC URL from chainName or rpcUrl, instantiates ArbitrumChainClient, calls getArbOSVersion(), and returns formatted text response.case "arbos_version": { const rpcUrl = await this.resolveRpcUrl( (args.rpcUrl as string) || (args.chainName as string) ); const chainDataClient = new ArbitrumChainClient(rpcUrl); const version = await chainDataClient.getArbOSVersion(); return { content: [ { type: "text", text: `ArbOS Version: ${version}`, }, ], }; }
- src/index.ts:907-927 (schema)Tool schema definition including name, description, and inputSchema for 'arbos_version', used for both validation and tool listing/registration in getAvailableTools().{ name: "arbos_version", description: "Get the ArbOS version number for any Arbitrum chain. Use this for questions like 'what ArbOS version is Xai running?', 'ArbOS version of Arbitrum One', 'what version of ArbOS', or 'check ArbOS version'. Supports chain names like 'Xai', 'Arbitrum One', 'Nova', etc.", inputSchema: { type: "object" as const, properties: { rpcUrl: { type: "string", description: "The RPC URL of the Arbitrum node (optional if default is set)", }, chainName: { type: "string", description: "Chain name (e.g., 'Xai', 'Arbitrum One', 'Nova') - will auto-resolve to RPC URL", }, }, required: [], }, },
- Core helper function getArbOSVersion() in ArbitrumChainClient that fetches ArbOS version using @arbitrum/orbit-sdk/utils or fallback RPC call to 'arb_getVersion'.async getArbOSVersion(): Promise<string> { try { // Try using orbit-sdk first const version = await getArbOSVersion(this.publicClient); return version.toString(); } catch (error) { // Fallback to direct RPC call try { const version = await this.makeRpcCall("arb_getVersion", []); return version; } catch (rpcError) { // Return "Unknown" instead of throwing error for better UX return "Unknown (RPC does not support ArbOS version queries)"; } } }