Skip to main content
Glama

rivian_get_user_info

Retrieve Rivian account details including vehicle information, software versions, and user profile data through the Rivian MCP server.

Instructions

Look up your Rivian account — your vehicles, software versions, and account details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • mcp-server.js:454-466 (registration)
    MCP server tool registration for 'rivian_get_user_info' - defines the tool name, description, and async handler that calls rivian.getUserInfo() and formats the response.
    server.tool(
      'rivian_get_user_info',
      'Look up your Rivian account — your vehicles, software versions, and account details.',
      {},
      async () => {
        try {
          requireAuth();
          return text(formatUserInfo(await rivian.getUserInfo()));
        } catch (err) {
          return text(err.message);
        }
      },
    );
  • Core implementation of getUserInfo() - constructs and executes a GraphQL query to fetch current user data including vehicles, their details, and OTA information from the Rivian API.
    export async function getUserInfo() {
      const body = {
        operationName: 'getUserInfo',
        query: `query getUserInfo {
      currentUser {
        __typename
        id
        firstName
        lastName
        email
        vehicles {
          id
          vin
          name
          roles
          state
          createdAt
          updatedAt
          vas { __typename vasVehicleId vehiclePublicKey }
          vehicle {
            __typename
            id
            vin
            modelYear
            make
            model
            expectedBuildDate
            plannedBuildDate
            otaEarlyAccessStatus
            currentOTAUpdateDetails { url version locale }
            availableOTAUpdateDetails { url version locale }
            vehicleState {
              supportedFeatures { __typename name status }
            }
          }
        }
        registrationChannels { type }
      }
    }`,
        variables: null,
      };
    
      return (await gql(GRAPHQL_GATEWAY, body, authHeaders())).currentUser;
    }
  • formatUserInfo() helper function - formats the raw user info data into human-readable text, displaying user details and vehicle information including model, VIN, OTA status, and software versions.
    function formatUserInfo(user) {
      const lines = [`${user.firstName} ${user.lastName} (${user.email})`, ''];
    
      if (!user.vehicles?.length) {
        lines.push('No vehicles on this account.');
        return lines.join('\n');
      }
    
      for (const v of user.vehicles) {
        const car = v.vehicle;
        lines.push(v.name || car.model);
        lines.push(`  ${car.modelYear} ${car.make} ${car.model}`);
        lines.push(`  VIN: ${v.vin}`);
        lines.push(`  Vehicle ID: ${v.id}`);
    
        if (car.otaEarlyAccessStatus) {
          lines.push(`  OTA early access: ${car.otaEarlyAccessStatus === 'OPTED_IN' ? 'Yes' : 'No'}`);
        }
        if (car.currentOTAUpdateDetails) {
          lines.push(`  Software: v${car.currentOTAUpdateDetails.version}`);
        }
        if (car.availableOTAUpdateDetails) {
          lines.push(`  Update available: v${car.availableOTAUpdateDetails.version}`);
          lines.push(`  Release notes: ${car.availableOTAUpdateDetails.url}`);
        } else {
          lines.push('  Software is up to date');
        }
        lines.push('');
      }
    
      return lines.join('\n').trim();
    }
  • gql() helper function - handles HTTP POST requests to the Rivian GraphQL API, including header construction, error handling, and response parsing.
    async function gql(url, body, extraHeaders = {}) {
      const res = await fetch(url, {
        method: 'POST',
        headers: {
          ...BASE_HEADERS,
          'dc-cid': `m-ios-${crypto.randomUUID()}`,
          ...extraHeaders,
        },
        body: JSON.stringify(body),
      });
    
      const json = await res.json();
    
      if (json.errors?.length) {
        const e = json.errors[0];
        const msg = e.message || e.extensions?.code || 'Unknown GraphQL error';
        const err = new Error(msg);
        err.code = e.extensions?.code;
        err.reason = e.extensions?.reason;
        throw err;
      }
    
      if (!res.ok) {
        throw new Error(`HTTP ${res.status}`);
      }
    
      return json.data;
    }
  • authHeaders() helper function - constructs authentication headers using session tokens (A-Sess and U-Sess) required for authenticated API requests.
    function authHeaders() {
      return { 'A-Sess': appSessionToken, 'U-Sess': userSessionToken };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It implies a read-only operation ('Look up') but doesn't specify authentication requirements, rate limits, error conditions, or response format. For a tool accessing account data with no annotation coverage, this leaves significant gaps in understanding how the tool behaves in practice.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that efficiently conveys the core purpose without unnecessary words. It's front-loaded with the main action ('Look up your Rivian account') and adds specific details concisely. Every part of the sentence earns its place by clarifying scope.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (simple lookup with no parameters) and lack of annotations or output schema, the description is minimally adequate. It covers what the tool does but lacks details on authentication, response structure, or error handling. For a tool accessing user account data, this leaves the agent with incomplete context for reliable use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, focusing instead on the tool's purpose. This aligns with the baseline expectation for tools without parameters, as there's nothing to compensate for.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Look up your Rivian account' with specific details about what information is retrieved ('your vehicles, software versions, and account details'). It uses a specific verb ('Look up') and identifies the resource ('Rivian account'), but doesn't explicitly differentiate from sibling tools like rivian_get_vehicle_state or rivian_get_drivers_and_keys, which might retrieve overlapping or related information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication status), exclusions, or comparisons to sibling tools such as rivian_get_vehicle_state (which might focus on real-time vehicle data) or rivian_get_drivers_and_keys (which might handle user permissions). The user must infer usage from the purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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