Skip to main content
Glama
Otii MCP Server
by qoitech

energy_between_messages

Calculates energy consumed between matching UART log messages in an Otii recording, with optional end marker and occurrence selection to isolate one firmware cycle.

Instructions

Energy from the n:th (0-based occurrence) UART log line exactly equal to start_message to the next line exactly equal to end_message. end_message defaults to start_message, which gives one full cycle for firmware that prints a marker once per cycle. Use occurrence >= 1 to skip a first cycle 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": {
      "start_message": "<start_message>"
    },
    "name": "energy_between_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceNo
occurrenceNo
end_messageNo
recording_idNo
start_messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.6/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 does disclose key behavior: matching is exact string equality, occurrence is 0-based, end_message falls back to start_message, and recording defaults to the latest. It omits the energy unit, the return shape, and what happens when no matching line exists, which are significant for a measurement 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?

Front-loads the core measurement definition, then adds defaults and the occurrence tip in descending order of importance. Line breaks split sentences awkwardly mid-clause, but there is no filler content.

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?

No output schema and no annotations mean the description is the only source of truth, and it leaves the measurement unit, return value, and the device parameter unaddressed. For a 5-parameter measurement tool, that leaves real gaps despite strong coverage of the matching semantics.

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%, so the description must compensate. It defines occurrence (0-based) and end_message (defaults to start_message), and 'Defaults to the latest recording' hints at recording_id, but device is never explained and start_message's exact-equality semantics need to be inferred from the flow.

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 states a specific measure-and-bound operation: energy measured between the n:th UART log line matching start_message and the next line matching end_message. The UART-log framing implicitly distinguishes it from energy_between_gpi_edges, but no sibling is named, so the differentiation is left to inference.

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 operational guidance: use occurrence >= 1 to skip an initialization cycle, end_message defaults to start_message for single-marker firmware, and recordings default to the latest. It stops short of stating when-not conditions or naming alternative tools for related measurements.

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