Skip to main content
Glama
andy-qingcai

PPK2 MCP Server

by andy-qingcai

detect_activity_segments

Segment power captures into active and sleep periods by current threshold, returning each segment's timing, average current, charge, and active duty cycle; filter short glitches with min duration.

Instructions

功耗分段(阈值滞回):按 threshold_ua 分 active/sleep 段。

返回每段起止/均值/电量与 active 占空比——回答"睡眠电流多少、 活动占空比多少"类问题。min_duration_s 过滤毛刺段。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_sNo
start_sNo
capture_idYes
threshold_uaYes
min_duration_sNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it partially meets it by disclosing the return contents (per-segment start/end/mean/charge and active duty-cycle) and the glitch-filtering behavior of min_duration_s. It does not state that the operation is read-only/non-mutating, nor mention permissions, rate limits, or how results are scoped. Adequate but incomplete for a zero-annotation tool.

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 text is compact and front-loads the mechanism and threshold parameter before the return values and optional filter. Every clause carries information; only minor polish (no explicit delimiter between mechanism and output description) keeps it from a 5.

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

Completeness3/5

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

Since there is no output schema, the description's enumeration of returned fields (start/end/mean/charge, duty cycle) is genuinely necessary and present, which is a strength. But it omits the meaning of capture_id and the start_s/end_s window for a 5-parameter analysis tool, leaving a gap an agent would need filled elsewhere.

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 0% across 5 parameters, so the description must compensate. It explains threshold_ua (the segmentation threshold) and min_duration_s (filters out short/glitch segments), covering 2 of 5. It says nothing about capture_id, start_s, or end_s, leaving the time-window semantics of the analysis range undocumented.

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?

The description names a specific operation (power-consumption segmentation) and the mechanism (threshold hysteresis dividing into active/sleep segments keyed on threshold_ua), which is more informative than a generic 'analyze' label. It differentiates itself implicitly from the broad analyze_capture sibling by describing the segmentation method. It stops short of explicitly naming the alternative, so it is not a 5.

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?

It gives an implied usage frame by stating it answers questions like 'what is the sleep current / active duty cycle', which tells the agent when this tool is relevant. However, there is no explicit when-not guidance and no mention of analyze_capture or estimate_battery_life as alternatives, so the agent must infer the boundary.

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