Skip to main content
Glama

rivian_get_drivers_and_keys

Retrieve a list of drivers, phone keys, and key fobs that have access to your Rivian vehicle.

Instructions

See who has access to your vehicle — drivers, phone keys, and key fobs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • mcp-server.js:221-234 (registration)
    Registration of the 'rivian_get_drivers_and_keys' tool on the MCP server, with schema (empty) and the handler callback.
    server.tool(
      'rivian_get_drivers_and_keys',
      'See who has access to your vehicle — drivers, phone keys, and key fobs.',
      {},
      async () => {
        try {
          requireAuth()
          const vehicleId = await resolveVehicleId()
          return text(format.formatDriversAndKeys(await rivian.getDriversAndKeys(vehicleId)))
        } catch (err) {
          return text(err.message)
        }
      },
    )
  • The 'getDriversAndKeys' function that executes the GraphQL query (DriversAndKeys) to fetch invited users, their devices (phone keys, fobs), and provisioning status from the Rivian API.
    export async function getDriversAndKeys(vehicleId) {
      const body = {
        operationName: 'DriversAndKeys',
        query: `query DriversAndKeys($vehicleId: String) {
      getVehicle(id: $vehicleId) {
        __typename
        id
        vin
        invitedUsers {
          __typename
          ... on ProvisionedUser {
            firstName lastName email roles userId
            devices { type mappedIdentityId id hrid deviceName isPaired isEnabled }
          }
          ... on UnprovisionedUser {
            email inviteId status
          }
        }
      }
    }`,
        variables: { vehicleId },
      }
    
      return (await gql(GRAPHQL_GATEWAY, body, authHeaders())).getVehicle
    }
  • Formatting helper that transforms the raw API response into a human-readable string showing drivers, their roles, and paired/enabled phone keys and fobs.
    export function formatDriversAndKeys(data) {
      const lines = []
    
      if (data.vin) lines.push(section(`Vehicle ${data.vin}`))
      else lines.push(section('Drivers & Keys'))
    
      if (!data.invitedUsers?.length) {
        lines.push(c.dim('No drivers or keys found.'))
        return lines.join('\n')
      }
    
      lines.push('')
      for (const user of data.invitedUsers) {
        if (user.firstName) {
          lines.push(`  ${c.bold(`${user.firstName} ${user.lastName}`)} ${c.dim(`(${user.email})`)}`)
          if (user.roles?.length) lines.push(kv('Roles', user.roles.join(', ')))
    
          if (user.devices?.length) {
            for (const d of user.devices) {
              const name = d.deviceName || d.type
              const paired = d.isPaired ? c.green('paired') : c.red('not paired')
              const enabled = d.isEnabled ? c.green('enabled') : c.red('disabled')
              lines.push(`    ${c.dim('└')} ${name} — ${paired}, ${enabled}`)
            }
          }
        } else {
          lines.push(`  ${c.dim('○')} ${user.email} ${c.dim(`(invited, ${user.status})`)}`)
        }
        lines.push('')
      }
    
      return lines
        .filter((l) => l !== null)
        .join('\n')
        .trim()
    }
Behavior3/5

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

No annotations are provided, and the description only implies read-only behavior ('See who has access'). It does not disclose any additional behavioral traits such as authentication requirements, rate limits, or data freshness. Given the low complexity, this is adequate but not enriching.

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 concise sentence that front-loads the key information. Every word contributes to the purpose, with no unnecessary details.

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

Completeness5/5

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

Given the tool has no parameters and no output schema, the description sufficiently explains what the tool does. It is complete for the user to understand its functionality without ambiguity.

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 no parameters, and the description does not need to add parameter meaning. Per guidelines, 0 parameters warrants a baseline of 4. No additional information is required.

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

Purpose5/5

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

The description explicitly states the tool's purpose: to list drivers and keys with access to the vehicle. It uses a clear verb ('see') and resource, effectively distinguishing it from sibling tools like rivian_get_charging_history or rivian_get_user_info.

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

Usage Guidelines4/5

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

While no explicit when-to-use or when-not-to-use guidance is provided, the simplicity of the tool (no parameters, read-only) and the clear distinction from siblings make the usage context obvious. A score of 4 reflects that guidance is not critical but would be beneficial for clarity.

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