Skip to main content
Glama

international-vin-decoder

Decode a 17-character Vehicle Identification Number to retrieve detailed vehicle specifications and history.

Instructions

Decode an international VIN and get detailed vehicle info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vinYes17-character Vehicle Identification Number

Implementation Reference

  • Tool handler: registers the 'international-vin-decoder' tool on the MCP server. Accepts a 17-character VIN, calls the CarsXE API endpoint 'v1/international-vin-decoder', and returns formatted results.
    import { z } from "zod";
    import { carsxeApiRequest } from "../utils/carsxeApi.js";
    import { CarsXEInternationalVinDecoderResponse } from "../types/carsxe.js";
    import { formatInternationalVinDecoderResponse } from "../formatters/carsxe.js";
    import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    
    export function registerInternationalVinDecoderTool(
      server: McpServer,
      getApiKey: () => string | null,
    ) {
      server.tool(
        "international-vin-decoder",
        "Decode an international VIN and get detailed vehicle info",
        {
          vin: z
            .string()
            .min(17)
            .max(17)
            .describe("17-character Vehicle Identification Number"),
        },
        async ({ vin }) => {
          const apiKey = getApiKey();
          if (!apiKey) {
            return {
              content: [
                {
                  type: "text",
                  text: "❌ API key not provided. Please ensure X-API-Key header is set.",
                },
              ],
            };
          }
    
          const data =
            await carsxeApiRequest<CarsXEInternationalVinDecoderResponse>(
              "v1/international-vin-decoder",
              { vin },
              apiKey,
            );
          if (!data || !data.success) {
            return {
              content: [
                {
                  type: "text",
                  text: "❌ Failed to decode international VIN. Please check the VIN and try again.",
                },
              ],
            };
          }
          return {
            content: [
              {
                type: "text",
                text: formatInternationalVinDecoderResponse(data),
              },
            ],
          };
        },
      );
    }
  • Schema: CarsXEInternationalVinDecoderResponse interface defining all response fields (VIN, make, model, year, dimensions, emissions, etc.)
    export interface CarsXEInternationalVinDecoderResponse {
      success: boolean;
      input: {
        vin: string;
      };
      attributes: {
        vin: string;
        vid: string;
        make: string;
        model: string;
        year: string;
        product_type: string;
        body: string;
        series: string;
        fuel_type: string;
        gears: string;
        emission_standard: string;
        manufacturer: string;
        manufacturer_address: string;
        plant_country: string;
        engine_manufacturer: string;
        avg_co2_emission_g_km: string;
        no_of_axels: string;
        no_of_doors: string;
        no_of_seats: string;
        rear_brakes: string;
        steering_type: string;
        rear_suspension: string;
        front_suspension: string;
        wheel_size: string;
        wheel_size_array: string;
        wheelbase_mm: string;
        wheelbase_array_mm: string;
        height_mm: string;
        length_mm: string;
        width_mm: string;
        track_front_mm: string;
        track_rear_mm: string;
        max_speed_kmh: string;
        max_trunk_capacity_liters: string;
        min_trunk_capacity_liters: string;
        weight_empty_kg: string;
        max_weight_kg: string;
        max_roof_load_kg: string;
        permitted_trailer_load_without_brakes_kg: string;
        abs: string;
        check_digit: string;
        sequential_number: string;
      };
      timestamp: string;
    }
  • Helper: formatInternationalVinDecoderResponse transforms the API response into a formatted multiline string with all vehicle attributes.
    import { CarsXEInternationalVinDecoderResponse } from "../types/carsxe.js";
    
    export function formatInternationalVinDecoderResponse(
      data: CarsXEInternationalVinDecoderResponse,
    ): string {
      const a = data.attributes;
      return [
        `🌍 International VIN Decode`,
        `VIN: ${a.vin}`,
        `Make: ${a.make}`,
        `Model: ${a.model}`,
        `Year: ${a.year}`,
        `Product Type: ${a.product_type}`,
        `Body: ${a.body}`,
        `Series: ${a.series}`,
        `Fuel Type: ${a.fuel_type}`,
        `Gears: ${a.gears}`,
        `Emission Standard: ${a.emission_standard}`,
        `Manufacturer: ${a.manufacturer}`,
        `Manufacturer Address: ${a.manufacturer_address}`,
        `Plant Country: ${a.plant_country}`,
        `Engine Manufacturer: ${a.engine_manufacturer}`,
        `CO2 Emission (g/km): ${a.avg_co2_emission_g_km}`,
        `Axels: ${a.no_of_axels}`,
        `Doors: ${a.no_of_doors}`,
        `Seats: ${a.no_of_seats}`,
        `Rear Brakes: ${a.rear_brakes}`,
        `Steering: ${a.steering_type}`,
        `Rear Suspension: ${a.rear_suspension}`,
        `Front Suspension: ${a.front_suspension}`,
        `Wheel Size: ${a.wheel_size}`,
        `Wheelbase (mm): ${a.wheelbase_mm}`,
        `Height (mm): ${a.height_mm}`,
        `Length (mm): ${a.length_mm}`,
        `Width (mm): ${a.width_mm}`,
        `Track Front (mm): ${a.track_front_mm}`,
        `Track Rear (mm): ${a.track_rear_mm}`,
        `Max Speed (km/h): ${a.max_speed_kmh}`,
        `Trunk Capacity (L): ${a.min_trunk_capacity_liters} - ${a.max_trunk_capacity_liters}`,
        `Weight Empty (kg): ${a.weight_empty_kg}`,
        `Max Weight (kg): ${a.max_weight_kg}`,
        `Max Roof Load (kg): ${a.max_roof_load_kg}`,
        `Permitted Trailer Load (kg, no brakes): ${a.permitted_trailer_load_without_brakes_kg}`,
        `ABS: ${a.abs === "1" ? "Yes" : "No"}`,
        `Check Digit: ${a.check_digit}`,
        `Sequential Number: ${a.sequential_number}`,
        `Timestamp: ${data.timestamp}`,
      ]
        .filter(Boolean)
        .join("\n");
    }
  • src/MyMCP.ts:35-46 (registration)
    Registration: calls registerInternationalVinDecoderTool(this.server, getApiKey) in the MyMCP agent initialization.
        registerInternationalVinDecoderTool(this.server, getApiKey);
        registerGetMarketValueTool(this.server, getApiKey);
        registerGetVehicleHistoryTool(this.server, getApiKey);
        registerGetVehicleImagesTool(this.server, getApiKey);
        registerGetVehicleRecallsTool(this.server, getApiKey);
        registerVinOcrTool(this.server, getApiKey);
        registerGetYearMakeModelTool(this.server, getApiKey);
        registerDecodeObdCodeTool(this.server, getApiKey);
        registerRecognizePlateImageTool(this.server, getApiKey);
        registerGetLienTheftTool(this.server, getApiKey);
      }
    }
  • src/index.gcp.ts:51-61 (registration)
    Registration: calls registerInternationalVinDecoderTool(server, getApiKey) in the registerAllTools function for the HTTP server deployment.
      registerInternationalVinDecoderTool(server, getApiKey);
      registerGetMarketValueTool(server, getApiKey);
      registerGetVehicleHistoryTool(server, getApiKey);
      registerGetVehicleImagesTool(server, getApiKey);
      registerGetVehicleRecallsTool(server, getApiKey);
      registerVinOcrTool(server, getApiKey);
      registerGetYearMakeModelTool(server, getApiKey);
      registerDecodeObdCodeTool(server, getApiKey);
      registerRecognizePlateImageTool(server, getApiKey);
      registerGetLienTheftTool(server, getApiKey);
    }
Behavior2/5

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

No annotations provided. The description does not disclose read-only nature, authentication needs, or what 'detailed vehicle info' includes. This under-specifies behavioral traits.

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?

Single sentence that is front-loaded and contains no fluff. Appropriate length for this simple tool.

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?

No output schema and no description of return format, error handling, or what 'detailed vehicle info' entails. Incomplete for an agent to predict outcomes.

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

Parameters3/5

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

Schema coverage is 100% with clear constraints on the vin parameter. The description adds no extra meaning beyond the schema, so baseline 3 is appropriate.

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 clearly states the tool decodes an international VIN and returns detailed vehicle info. It is distinct from sibling tools like decode-vehicle-plate or get-vehicle-specs.

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

Usage Guidelines3/5

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

No guidance on when to use this tool vs alternatives. It is implied for VIN decoding, but lacks explicit context like not for plates or OBD codes.

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/carsxe/carsxe-mcp-server'

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