Skip to main content
Glama

Get battery

get_battery
Read-only

Retrieve current battery status for your Polestar: charge level, charging state, remaining range, time to full, and average consumption.

Instructions

Battery state: charge level %, charging status (V1/V2/type), charger connection and power status, estimated distance to empty (km and miles), estimated time to full, and average consumption kWh/100km. The contract also defines charging current and voltage, charging power, since-charge and automatic-trip consumption averages, and an energy-consumption breakdown: those appear only when the car reports them, so a missing field means unreported, not zero. The reference vehicle answered with 14 fields and none of the optional ones. (M2M endpoint: /v1/vehicles/{vin}/telemetry/battery, scope pdp-telemetry/battery).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawNoReturn the full raw API payload instead of (or after) the humanized summary. Unchanged upstream content: it carries the VIN even when POLESTAR_REDACT_VIN is on.
vinNoVehicle Identification Number. Optional when the credential has exactly one vehicle, omit it and the only vehicle is used.
delegated_account_idNoThird-party credentials only: read the shared vehicles of this account for this call. Must be listed in POLESTAR_DELEGATED_ACCOUNT_IDS.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesFalse when the call produced no data.
vinNoVehicle the result is about, masked when POLESTAR_REDACT_VIN is on.
codeNoMachine-readable error code when ok is false.
dataNoStructured payload; shape documented per tool.
hintNoActionable guidance when ok is false.
toolNoTool that produced this result.
messageYesResult text, identical to the content block.
requestIdNoUpstream request id, the handle support needs.
ageSecondsNoStaleness of the underlying telemetry.
httpStatusNoUpstream HTTP status when ok is false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, but the description adds valuable behavioral nuance beyond these: it explains that optional fields appear only when reported by the car, and that a missing field means unreported rather than zero. This prevents misinterpretation of sparse data. It also includes a concrete reference-vehicle example (14 fields, none optional) and exposes the raw parameter's side effect (VIN leak) via the schema but also reinforces the behavior. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is information-dense but efficiently organized: it front-loads the core battery fields, then discusses optional fields and the missing-field semantics, and ends with endpoint/scope details. Every sentence contributes useful context, and the structure (main fields, caveat, endpoint) is logical. It is slightly longer than strictly necessary but avoids redundancy, earning a 4 rather than 5.

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

Completeness5/5

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

Given that an output schema exists (not shown but indicated) and the description thoroughly explains the data contract (including optional-field behavior and a concrete example), the tool is fully specified for an agent to invoke correctly. The endpoint and OAuth scope are provided, and the raw parameter's behavior is covered in the schema. No critical operational detail is missing for a read-only telemetry query.

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% and each parameter (raw, vin, delegated_account_id) already has a clear description. The tool description adds no additional parameter-level semantics beyond what the schema provides, but it does reference the endpoint and scope which indirectly clarifies the vin usage. Since the schema carries the full explanatory burden, a baseline of 3 is appropriate; the description does not need to compensate.

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 opens with a clear and specific verb-resource pairing: 'Battery state' followed by an enumerated list of the exact metrics returned (charge level, charging status, distance to empty, time to full, consumption). This unambiguously differentiates it from sibling tools like get_odometer or get_location. It names the resource (battery) and gives a concrete inventory of output fields, making the tool's purpose unmistakable.

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

Usage Guidelines4/5

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

The description does not explicitly name alternative tools or state when NOT to use it, but it clearly implies its scope: any query about battery state or charging metrics. The field list and endpoint make the usage context obvious, and it notes the data contract for optional fields. While it lacks an explicit exclusion (e.g., 'for charging estimates use get_charging_estimate'), the purpose is unambiguous enough for an agent to select it appropriately.

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