Back to API Docs
MCP Tool Reference

lookup_trouble_code

Look up what a vehicle trouble code means in plain language, its common causes, and how urgent it is, over the Model Context Protocol.

A free key is required

Every MCP tool call carries a free Wrenchli API key, so calls are attributable and rate-limited per caller. Keys are instant and self-serve: POST your agent name and a contact email, and the key is returned once. Send it as an Authorization: Bearer header (or x-api-key) on each call.

POST https://www.wrenchli.net/mcp-keys
{
  "agent_name": "Your agent or product name",
  "developer_contact": "you@example.com"
}

The free taste tier allows 60 calls per minute per key. Calls are logged with their input shape (vehicle class, repair or code) and whether a figure was served; the log never carries a consumer's identity.

Request

Call the tool over the MCP endpoint with the code as read from the vehicle. An optional vehicle object is carried as context.

tools/call lookup_trouble_code
POST https://www.wrenchli.net/mcp
Authorization: Bearer wk_YOUR_KEY
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lookup_trouble_code",
    "arguments": { "code": "P0420" }
  }
}

Response: a code whose repair price is not published

The meaning always returns: code meanings are Wrenchli's own educational content. The price block follows the same credibility gate as the price check tool, so this code's meaning stands on its own with no figure attached.

structuredContent
{
  "tool": "lookup_trouble_code",
  "found": true,
  "code": "P0420",
  "name": "Catalyst System Efficiency Below Threshold (Bank 1)",
  "meaning": "Your vehicle's catalytic converter isn't cleaning exhaust gases as effectively as it should. This could mean the catalytic converter is worn out, or it could be caused by an upstream issue like a failing oxygen sensor.",
  "common_causes": [
    "Worn or failing catalytic converter",
    "Faulty oxygen sensor (upstream or downstream)",
    "Exhaust leak before the catalytic converter",
    "Engine misfire causing unburned fuel to damage the converter"
  ],
  "causes_note": "Common causes, most frequently reported first. Treat this as a list of possibilities to discuss with a technician, not a verdict on your vehicle: the same code can have different causes on different vehicles.",
  "urgency": "medium",
  "urgency_note": "Worth scheduling a look soon. Most drivers can keep driving gently in the meantime; if the vehicle starts running worse, move it up.",
  "diy_feasibility": "advanced",
  "vehicle_context": null,
  "price": {
    "repair": {
      "id": "catalytic_converter",
      "label": "Catalytic Converter Replacement"
    },
    "published": false,
    "note": "No price is published for the repair this code points to yet, so none is shown here; the meaning above stands on its own."
  }
}

Response: a code with a published price

Where the code maps to a repair whose range passes the grading, the price block is the same shape the price check tool returns, basis included.

structuredContent
{
  "tool": "lookup_trouble_code",
  "found": true,
  "code": "P0128",
  "name": "Coolant Thermostat Below Thermostat Regulating Temperature",
  "meaning": "Your engine isn't warming up to its ideal operating temperature quickly enough. This usually means the thermostat is stuck open, letting coolant flow continuously and preventing the engine from reaching proper temperature.",
  "common_causes": [
    "Stuck-open thermostat",
    "Faulty engine coolant temperature sensor",
    "Low coolant level",
    "Thermostat housing leak"
  ],
  "causes_note": "Common causes, most frequently reported first. Treat this as a list of possibilities to discuss with a technician, not a verdict on your vehicle: the same code can have different causes on different vehicles.",
  "urgency": "low",
  "urgency_note": "Not urgent for most drivers: plan to have it looked at when convenient, and pay attention to any change in how the vehicle runs.",
  "diy_feasibility": "moderate",
  "vehicle_context": null,
  "price": {
    "repair": {
      "id": "thermostat",
      "label": "Thermostat Replacement"
    },
    "published": true,
    "range_usd": {
      "low": 160,
      "high": 535
    },
    "range_formatted": "$160–$535",
    "parts_usd": {
      "low": 60,
      "high": 137
    },
    "labor_usd": {
      "low": 100,
      "high": 400
    },
    "labor_hours": {
      "low": 1,
      "high": 2
    },
    "basis": {
      "framing": "Published Wrenchli price book range. The low end is a competent independent shop on quality aftermarket parts; the high end is a franchised dealership on factory (OEM) parts. Labor corridors: independent shops $100-$132 per hour, dealerships $140-$200 per hour.",
      "scope_note": "The service part is the thermostat housing assembly (thermostat integrated), not a bare thermostat.",
      "provenance": "Re-derived 2026-11-14 from named sources (founder-approved 2026-11-14): PartsGeek (Replacement $35.95 / Aisin $51.97 / NTC-TAMA $61.97 housing assemblies, street); AutoZone (Duralast housing assemblies $31.99–$63.99); Cars245 (genuine Toyota 16031-25010 at $137.38 retail, carried as $137). Independent parts = street price x published markup tier (65–90% under $200). Labor 1.0–2.0h (book; AutoZone 1–2h). Representative vehicle: 2019 Toyota Camry 2.5L.",
      "book_version": "v2"
    },
    "value_context": {
      "status": "not_available",
      "note": "Value context is not available yet: Wrenchli is validating a market value source for this slot, and until it checks out the repair range stands on its own. This slot is never filled with a guessed value.",
      "repair_range_usd": {
        "low": 160,
        "high": 535
      },
      "vehicle_value_usd": null,
      "vehicle_value_source": null,
      "vehicle_value_as_of": null,
      "repair_to_value_ratio": null,
      "repair_to_value_band": null
    },
    "note": "A published range is planning information, not a quote, bid, or guaranteed price; a shop prices the actual job after a hands-on look."
  }
}

Coverage

The library covers the codes drivers ask about most, from Wrenchli's published code pages, and returns an honest not-in-the-library answer for the rest. Common causes are possibilities to discuss with a technician, ordered most frequently reported first; the tool never turns them into a verdict on a specific vehicle.

See also: the repair price check tool, and the developer documentation home.