Skip to main content
Glama

pio_power_profile

Measures a device's current draw over a set period from a serial meter or Nordic PPK2, reporting average/min/max/p95 mA, energy use, sleep vs. active time, and battery-life estimates.

Instructions

Measure the device's current draw for seconds and report average/min/max/p95 mA, energy (mWh and µAh when voltage is known), a bucketed timeline, the share of time in sleep vs active (threshold auto-detected from the two dominant current levels, or sleep_threshold_ma), and a battery-life estimate. source='serial' reads a meter streaming readings on port (INA219/INA226 sketch, USB power meter log; pattern regex with (?P) and optional (?P)/(?P) groups, default: first number with uA/mA/A). source='ppk2' drives a Nordic Power Profiler Kit II (needs the power extra). Set trigger + trigger_session_id to start measuring when the firmware prints a line.

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": "pio_power_profile"
  }
}

Input Schema

NameRequiredDescriptionDefault
baudNo
portNo
sourceNoserial
bucketsNo
patternNo
secondsNo
triggerNo
llm_modelNoThe model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics.
voltage_mvNo
conversation_idNoThe conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.
sleep_threshold_maNo
trigger_session_idNo

Output Schema

NameRequiredDescriptionDefault
_mcp_instructionsNoServer-issued metadata for this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.9.0
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "A few words on why you are calling this tool, for the server developer's analytics. Describe people and things by role, such as \"a customer\". Do not quote the user or include names, emails, or other personal details.",
      -  "type": "string"
      -}
    • removedInput schema / required
      Removed value: -[
      -  "context"
      -]
  2. Changed5 schema fields changedv0.6.2
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "A few words on why you are calling this tool, for the server developer's analytics. Describe people and things by role, such as \"a customer\". Do not quote the user or include names, emails, or other personal details.",
      +  "type": "string"
      +}
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "The model identifier you are running as, for example \"claude-opus-4-8\" or \"gpt-5.2\". Pass \"unknown\" if you are not certain. Recorded for the server developer's analytics.",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "context"
      +]
    • addedOutput schema / properties
      Added value: +{
      +  "_mcp_instructions": {
      +    "description": "Server-issued metadata for this conversation.",
      +    "properties": {
      +      "conversation_id": {
      +        "description": "The server-issued conversation identifier.",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  }
      +}
  3. Addedv0.2.0

TDQS

A4.1/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 hardware prerequisites (PPK2 `power` extra), the auto-detection behavior for the sleep threshold, the default pattern-parsing behavior, and what is returned. Gaps remain around blocking duration, serial-port permission needs, and whether the device must be running/flashed beforehand.

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 purpose and metric list, then mode details. It is dense and somewhat run-on in a single block, but nearly every clause adds information; only minor restructuring would improve scanability.

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 formatting needn't be explained. Given the complexity (two hardware sources, regex parsing, triggering), the description covers the critical paths well; remaining gaps are secondary params (buckets, voltage_mv) and preconditions like port permissions.

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 low (17%) across 12 parameters, so the description must compensate. It adds strong meaning for `pattern` (regex with (?P<value>), optional (?P<unit>)/(?P<voltage>) groups, default first-number parsing), `source`, `port`, `trigger`, `trigger_session_id`, and `sleep_threshold_ma`, but leaves `buckets`, `baud`, and `voltage_mv` undocumented, and the analytics params are only covered by schema text.

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?

States a specific verb and resource ('Measure the device's current draw for `seconds`') and immediately enumerates the reported metrics (average/min/max/p95 mA, energy, timeline, sleep share, battery-life estimate). No sibling tool covers power profiling, and an agent can tell exactly what this produces without opening the schema.

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?

Clearly explains the two operating modes and their conditions: source='serial' reads a streaming meter on `port`, source='ppk2' drives a Nordic PPK2 and 'needs the `power` extra'. It also explains when to use trigger/trigger_session_id. It lacks explicit when-not guidance, but mode selection is well covered.

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