Skip to main content
Glama

Tesla Vampire Drain

tesla_vampire_drain

Analyze overnight battery drain for parked Tesla vehicles. Detect 8+ hour parking periods and measure kWh loss, flagging camping-mode events when average drain exceeds threshold.

Instructions

Vampire drain analysis -- battery loss while parked overnight.

Checks for periods where the car was parked (no drives) for 8+ hours and measures battery drop. A parked period is tagged "露营模式" when the AVERAGE drain rate over the parked period is ≥ TESLA_CAMPING_KWH_PER_HOUR (default 0.8 kWh/h). The kWh conversion uses a fixed 75 kWh reference battery — so the threshold does NOT change whether the car is 75 / 82 / 100 kWh. Sentry and third-party-app activity are NOT distinguished from camping use: any aggregate drain rate at or above the threshold is flagged. If QWeather is configured, the current weather at the parking location is shown for the worst few events AND every camping-mode event (display-only).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoNumber of days to analyze (default: 14)
car_idNoFilter by vehicle ID (default: TESLA_CAR_ID env or first car)
end_dateNoFilter drain until this date (YYYY-MM-DD), defaults to today
start_dateNoFilter drain from this date (YYYY-MM-DD), overrides days param

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the 8-hour parked window, the camping-mode tagging rule and threshold, the fixed 75 kWh reference battery so the threshold is car-size-invariant, and the important limitation that Sentry/third-party activity is conflated with camping use. It omits only operational traits such as whether this is purely read-only and any permission or rate-limit considerations.

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?

Front-loaded with the one-line purpose, then the threshold and caveats in dense but necessary prose. Every sentence earns its place: the window length, threshold, fixed reference battery, and Sentry caveat all change how an agent interprets the output.

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

Completeness4/5

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

An output schema exists, so return values need not be explained, and the description supplies the interpretive context (what 'camping mode' means, why the threshold is fixed, what caveats apply). It is essentially complete for a read-only analysis tool, lacking only an explicit read-only/permission statement.

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 description coverage is 100% (days, car_id, start_date, end_date each documented), so the schema does the parameter work and the description adds no syntax or format detail beyond it. Baseline 3 applies. Notably, the description's start/end defaults and car selection are left entirely to the schema.

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 first line states a specific verb and resource: vampire drain analysis of battery loss while parked overnight. It is clearly distinguishable from siblings like tesla_battery_health or tesla_state_history because it names the overnight-parked-loss phenomenon and the 8+ hour parked-window criterion.

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?

Usage is implied by the framing (analyze overnight parked battery loss, with camping-mode tagging), and the caveat that Sentry/third-party drain is not distinguished tells the agent when results may mislead. However, it never explicitly names an alternative tool (e.g. battery_health, state_history) or states when-not to use this one.

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