Plan the cheapest charge
plan_cheapest_chargeFind the cheapest hours to charge your Polestar within its scheduled charge window using hourly electricity prices, ensuring enough energy to reach the target charge level.
Instructions
Given hourly electricity prices, computes the cheapest hours inside the car's charge window (from global-charge-timer) that deliver enough energy to reach the target charge level.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vin | No | Vehicle Identification Number. Optional when the credential has exactly one vehicle, omit it and the only vehicle is used. | |
| phases | No | AC phases at your charger (default 3, Swedish 400V three-phase). | |
| prices | Yes | Hourly prices from your spot-price provider: [{startsAt: "2026-09-19T22:00:00+02:00", price: 0.42}, ...] | |
| capacityKwh | No | Usable pack capacity; auto-derived from dischargeInfo.energyAvailable when the car reports it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | False when the call produced no data. | |
| vin | No | Vehicle the result is about, masked when POLESTAR_REDACT_VIN is on. | |
| code | No | Machine-readable error code when ok is false. | |
| data | No | Structured payload; shape documented per tool. | |
| hint | No | Actionable guidance when ok is false. | |
| tool | No | Tool that produced this result. | |
| message | Yes | Result text, identical to the content block. | |
| requestId | No | Upstream request id, the handle support needs. | |
| ageSeconds | No | Staleness of the underlying telemetry. | |
| httpStatus | No | Upstream HTTP status when ok is false. |