Skip to main content
Glama
Otii MCP Server
by qoitech

energy_between_gpi_edges

Compute energy over complete intervals when an Otii GPI pin is high or low, enabling precise measurement of firmware active or sleep phases.

Instructions

Energy during the n:th (0-based occurrence) interval where Otii digital input GPI pin (1 or 2) is high (or low if high=false), from the edge into that level to the edge out of it. For firmware that sets a GPIO wired to the Otii GPI while in a phase, e.g. active or sleeping; this is more precise than UART log markers. The level at recording start is not an edge, so only complete intervals count. The GPI channel must have been recorded (measure with channels=["i1"] or ["i2"], and exp_voltage set to the device's IO voltage). Use occurrence >= 1 to skip a first interval that includes start-up. Defaults to the latest recording.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pin": "<pin>"
    },
    "name": "energy_between_gpi_edges"
  }
}

Input Schema

NameRequiredDescriptionDefault
pinYes
highNo
deviceNo
occurrenceNo
recording_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.3/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 that the level at recording start is not an edge, that only complete intervals count, that the GPI channel must have been recorded with exp_voltage set, and that it defaults to the latest recording. It omits the unit/format of the returned energy and any error behavior for missing channels.

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-loads the core definition before the usage rationale and prerequisites, and every sentence adds information. It is dense and slightly long-winded in the middle clause, but no sentence is filler.

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 five-parameter measurement tool with no annotations and no output schema, the description covers the interval semantics, recording prerequisites, and defaults. The main missing piece is what the returned energy value looks like (units, aggregation), which matters since no output schema exists.

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 0%, so the description must compensate, and it explains pin (1 or 2), high (true = high level, false = low), occurrence (0-based, skip first interval), and recording_id (defaults to latest recording). Only device is left unexplained, a minor gap against five parameters.

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 — energy over the n:th interval between GPI edges — and defines the interval precisely (edge into level to edge out of it), including the pin/high polarity. It also implicitly distinguishes itself from the log-marker sibling by claiming greater precision than UART log markers.

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 a concrete use case (firmware toggling a GPIO during active/sleeping phases) and a comparison point ('more precise than UART log markers'), plus a practical tip to use occurrence >= 1 to skip start-up. It does not explicitly name the alternative tool to use when log markers are the only signal, so it stops short of full when/when-not routing.

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