Skip to main content
Glama

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
NameRequiredDescriptionDefault
vehicle_idYesVehicle 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 output
    server.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);
        }
      },
    );
  • Core implementation that executes a GraphQL query to Rivian's API to fetch current and available OTA update details for a vehicle
    export 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;
    }
  • Helper function that formats the OTA status data into human-readable text showing current version and available updates
    function 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');
    }
  • Helper function that constructs authentication headers required for authenticated API calls including the OTA status query
    function authHeaders() {
      return { 'A-Sess': appSessionToken, 'U-Sess': userSessionToken };
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PatrickHeneise/rivian-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server