Skip to main content
Glama

Estimate MCU power consumption and battery runtime

datasheetvend_estimate_power_runtime
Read-onlyIdempotent

Estimate microcontroller battery runtime and average current from active, sleep and burst phases, with plain arithmetic and no model call. Give a hand-checked example (sample_part_id: 'stm32g031k8', 'nrf52840', 'esp32') and optionally pick its modes by name, or give your own currents in uA (a typed 0 counts; a missing value does not). Typical and worst-case runtimes are decided separately: runtime_typ_days or runtime_max_days is null, with the reasons in blockers or max_blockers, when a current is missing, a voltage cannot work (chip range, LDO headroom, buck step-down) or the battery cannot supply the peak. A typical figure is never used as a maximum. Not modelled: temperature or age effects on battery capacity, boost converters, charging. Free, no API key, reads no account data.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
wake_usNoWake-up time per cycle, microseconds. Default: the sleep mode's own, if stated.
burst_msNoRadio or high-current burst time per cycle, milliseconds.
sleep_msNoSleep time per cycle, milliseconds.
active_msNoActive time per cycle, milliseconds.
mcu_vdd_vNoRegulator output voltage (LDO or buck).
burst_modeNoMode name from the example part for the burst phase.
chip_max_vNoChip's maximum supply voltage.
chip_min_vNoChip's minimum supply voltage.
sleep_modeNoMode name from the example part for the sleep phase.
active_modeNoMode name from the example part for the active phase.
ldo_dropout_vNoLDO dropout voltage. Default 0.2 V (assumed).
temperature_cNoTemperature column to read, e.g. 25, 85 or 125 (STM32G031 example).
battery_full_vNoVoltage when fresh or fully charged.
battery_presetNoBattery starting point. Default: cr2032, or the example's. 'custom' needs battery_capacity_mah and battery_nominal_v.
sample_part_idNoHand-checked example part.
regulator_iq_uaNoRegulator's own current, uA. Required for an LDO. Buck: only what its efficiency leaves out.
battery_cutoff_vNoVoltage at which the battery counts as empty.
burst_current_uaNoYour typical burst current, uA.
sleep_current_uaNoYour typical sleep current, uA.
active_current_uaNoYour typical active current, uA. Replaces the mode's figure.
battery_nominal_vNoNominal voltage.
external_burst_uaNoOther board load during the burst, uA.
external_sleep_uaNoOther board load during sleep, uA.
external_active_uaNoOther board load during the active phase, uA.
regulator_topologyNoHow the battery feeds the chip. Default: direct, or the example's.
battery_capacity_mahNoRated capacity, mAh.
battery_max_pulse_maNoLargest peak the battery supplies, mA. 0 = not checked.
battery_usable_shareNoShare of rated capacity you expect to get.
burst_max_current_uaNoYour maximum burst current, uA.
sleep_max_current_uaNoYour maximum sleep current, uA.
active_max_current_uaNoYour maximum active current, uA.
buck_sleep_efficiencyNoBuck efficiency at light load. Default 0.65 (assumed).
buck_active_efficiencyNoBuck efficiency under load. Default 0.88 (assumed).
include_self_dischargeNoCount battery self-discharge.
burst_includes_processorNoAdd the active (processor) current on top of the burst current.
battery_max_continuous_maNoAverage current the capacity is rated at, mA. 0 = not given.
peaks_supplied_by_capacitorNoYour design has a capacitor that supplies peaks above the battery's limit.
battery_self_discharge_pct_per_yearNoSelf-discharge, percent per year.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds real value beyond them: no model call, no API key, no account data read, separate typical/worst-case outcome paths, null-plus-blockers failure reporting, and an explicit 'not modelled' list (temperature/age effects, boost converters, charging). A 5 would need nothing further; the scoring rubric reserves that for definitions that leave no behavioral question open.

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?

Front-loaded with the core action and kept to a few dense sentences with no filler. The middle portion packs the null/blockers logic into a long clause chain with parentheticals, which is information-dense but harder to scan than a short bulleted structure would be.

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?

For a 38-parameter tool with no output schema, the description does the heavy lifting: it names the outcome fields (runtime_typ_days, runtime_max_days, blockers, max_blockers), states the operating modes covered, and lists exclusions. It does not enumerate the returned current figures or the full result shape, leaving some return-value inference to the caller.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description genuinely adds meaning the schema does not: the 0-versus-missing distinction ('a typed 0 counts; a missing value does not'), the ability to select modes by name from the example part, and the semantic reason a result can be null. For a 38-parameter surface this is useful disambiguation beyond field descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Estimate microcontroller battery runtime and average current') plus the inputs it derives them from ('active, sleep and burst phases') and the method ('plain arithmetic and no model call'). It is distinguishable from the sibling 'estimate_power_budget' by the runtime/battery framing, though it never names a sibling to sharpen the contrast.

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?

Gives concrete invocation paths: supply a hand-checked sample part and optionally name its modes, or pass your own currents in uA, and explicitly notes that a typed 0 counts while a missing value does not. It also explains when results are null and why. It stops short of stating when to prefer this over the sibling power-budget tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources