Skip to main content
Glama
keithah

Tessie MCP Extension

get_vehicles

Retrieve a list of all Tesla vehicles linked to your Tessie account for monitoring and management purposes.

Instructions

List all vehicles in the Tessie account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool registration and handler for 'get_vehicles'. Fetches vehicles using TessieClient and returns formatted list in MCP-compliant response format.
    server.tool(
      "get_vehicles",
      "List all vehicles in the Tessie account",
      {},
      async () => {
        try {
          const vehicles = await tessieClient.getVehicles();
          const result = {
            total_vehicles: vehicles.length,
            vehicles: vehicles.map(vehicle => ({
              vin: vehicle.vin,
              display_name: vehicle.display_name
            }))
          };
    
          // Wrap in MCP format
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(result, null, 2)
              }
            ]
          };
        } catch (error) {
          const enhancedError = ErrorHandler.classifyError(error);
    
          if (ErrorHandler.shouldDegrade(enhancedError)) {
            const fallbackData = {
              status: 'degraded',
              error_type: enhancedError.type,
              message: enhancedError.userFriendly,
              suggestion: enhancedError.suggestion,
              vehicles: [],
              fallback_note: 'Vehicle list temporarily unavailable. Try again in a few moments.'
            };
    
            // Wrap error fallback in MCP format
            return {
              content: [
                {
                  type: "text",
                  text: JSON.stringify(fallbackData, null, 2)
                }
              ]
            };
          }
    
          throw new Error(ErrorHandler.formatErrorForUser(enhancedError));
        }
      }
    );
  • TessieClient.getVehicles() method: Core implementation that queries the Tessie API /vehicles endpoint and extracts VIN/display_name.
    async getVehicles(): Promise<Array<{ vin: string; display_name: string }>> {
      return ErrorHandler.withRetry(async () => {
        const response: AxiosResponse<{ results: any[] } | any[]> =
          await this.client.get('/vehicles');
    
        // Handle both old and new API response formats
        let vehicles: any[];
        if (response.data && typeof response.data === 'object' && 'results' in response.data) {
          vehicles = response.data.results;
        } else {
          vehicles = response.data as any[];
        }
    
        // Extract VIN and display name from the new format
        return vehicles.map(vehicle => ({
          vin: vehicle.vin,
          display_name: vehicle.last_state?.vehicle_state?.vehicle_name || vehicle.display_name || `Vehicle ${vehicle.vin.slice(-6)}`
        }));
      }, {
        maxRetries: 2, // Account list is fairly stable
        baseDelay: 1500
      });
    }
  • Natural language query parser recognizes vehicle list queries and maps to 'get_vehicles' operation.
    if (lowerQuery.includes('vehicle') && (lowerQuery.includes('list') || lowerQuery.includes('all'))) {
      return {
        operation: 'get_vehicles',
        parameters: {},
        confidence: 0.8
      };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a list operation, implying read-only behavior, but doesn't address potential constraints like pagination, rate limits, authentication needs, or what happens if no vehicles exist. This leaves significant gaps for a tool with zero annotation coverage.

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, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the return value includes (e.g., vehicle IDs, models, status) or behavioral aspects like error handling. For a tool with zero structured metadata, more contextual information is needed.

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 tool has 0 parameters, and schema description coverage is 100%, so there's no need for parameter documentation in the description. The baseline for this scenario is 4, as the description appropriately avoids redundant parameter information.

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 verb ('List') and resource ('all vehicles in the Tessie account'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_vehicle_current_state' or 'get_driving_history', which prevents a perfect score.

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 like 'get_vehicle_current_state' for real-time data or 'get_driving_history' for historical information. It lacks context about use cases, prerequisites, or exclusions.

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/keithah/tessie-mcp'

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