rivian_get_ota_status
Check your Rivian vehicle's current software version and available OTA updates using the vehicle ID from your account.
Instructions
Check for software updates — what version you're running and whether a new one is available.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vehicle_id | Yes | Vehicle ID from your account info |
Implementation Reference
- mcp-server.js:489-503 (registration)Tool registration with schema (vehicle_id parameter) and handler that calls rivian.getOTAUpdateDetails and formats the outputserver.tool( 'rivian_get_ota_status', "Check for software updates — what version you're running and whether a new one is available.", { vehicle_id: z.string().describe('Vehicle ID from your account info'), }, async ({ vehicle_id }) => { try { requireAuth(); return text(formatOTAStatus(await rivian.getOTAUpdateDetails(vehicle_id))); } catch (err) { return text(err.message); } }, );
- lib/rivian.js:178-191 (handler)Core implementation that executes a GraphQL query to Rivian's API to fetch current and available OTA update details for a vehicleexport async function getOTAUpdateDetails(vehicleId) { const body = { operationName: 'getOTAUpdateDetails', query: `query getOTAUpdateDetails($vehicleId: String!) { getVehicle(id: $vehicleId) { availableOTAUpdateDetails { url version locale } currentOTAUpdateDetails { url version locale } } }`, variables: { vehicleId }, }; return (await gql(GRAPHQL_GATEWAY, body, authHeaders())).getVehicle; }
- mcp-server.js:296-315 (helper)Helper function that formats the OTA status data into human-readable text showing current version and available updatesfunction formatOTAStatus(ota) { const lines = []; if (ota.currentOTAUpdateDetails) { lines.push(`Current software: v${ota.currentOTAUpdateDetails.version}`); } else { lines.push('Current software: unknown'); } if (ota.availableOTAUpdateDetails) { lines.push(`Update available: v${ota.availableOTAUpdateDetails.version}`); if (ota.availableOTAUpdateDetails.url) { lines.push(`Release notes: ${ota.availableOTAUpdateDetails.url}`); } } else { lines.push('No update available — software is up to date.'); } return lines.join('\n'); }
- lib/rivian.js:276-278 (helper)Helper function that constructs authentication headers required for authenticated API calls including the OTA status queryfunction authHeaders() { return { 'A-Sess': appSessionToken, 'U-Sess': userSessionToken }; }