Skip to main content
Glama

measure

Runs a sequence of register reads, writes, delays and waits back to back with no host traffic between them, returning results in order to measure hardware timing and behavior.

Instructions

Runs a sequence of steps on the target back to back, with no traffic to the host between them, and returns each step's result in order. Use it when the order and timing of register accesses matter, as when finding out what the hardware does.

Steps (addresses and values as numbers or "0x..." text; width 1, 2, 4, 8 or 16, default 4; any step that gives a result may carry a "label"): {"op": "read", "address": A, "width": W} the value read {"op": "write", "address": A, "width": W, "value": V} {"op": "delay", "cycles": N} waits at least N CPU cycles {"op": "time"} the CPU's cycle counter, 32 bits {"op": "wait", "address": A, "width": W, "mask": M, "value": V, "timeout": N} reads until (value read & M) == V; the cycles waited, or the sequence ends in TIMEOUT {"op": "repeat", "count": N, "steps": [...]} up to three deep {"op": "call", "address": A} calls code at A; what it returned

processor is "ee" or "iop": which runs the steps, and in whose address space. On the IOP widths go up to 4, and the clock that time, delay and a wait's timeout count in is a console's 36.864 MHz system clock, which is the IOP's own.

interrupts_off runs it with interrupts disabled. note says what the measurement is for, and is kept with it in the journal. If a step fails, the results up to it are still returned, with failed saying why.

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": {
      "steps": "<steps>"
    },
    "name": "measure"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNo
stepsYes
processorNoee
interrupts_offNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does so: it discloses partial-failure behavior (results up to the failing step are still returned with `failed` explaining why), the timeout semantics of wait, the three-level nesting cap on repeat, the IOP width ceiling of 4, and the exact clock that delay/time/timeout count in. These are behavioral traits nothing else in the definition would reveal.

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 purpose and the when-to-use sentence are front-loaded, and the indented op table packs a lot of meaning into little space. A few clauses are more roundabout than needed (e.g. the nested explanation of the 36.864 MHz system clock), but nothing is filler.

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

Completeness5/5

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

For a four-parameter tool with a nested step language and an output schema, the description covers sequencing, timing, failure, nesting depth, and per-processor constraints. With the output schema already documenting return shape, nothing an agent needs to invoke this correctly is missing.

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

Parameters5/5

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

Schema description coverage is 0%, and the description fully compensates by specifying the step grammar op by op with field names, defaults (width defaults to 4), accepted value forms (numbers or "0x..." text), and optional labels. It also explains processor ('ee' vs 'iop', and whose address space the steps run in), interrupts_off, and that note is persisted with the measurement in the journal.

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 ('runs a sequence of steps on the target') plus the defining property that separates it from a plain single-step tool: steps execute back to back with no traffic to the host between them, results returned in order. An agent can distinguish this from siblings like step or run 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?

Gives a concrete selection condition: 'Use it when the order and timing of register accesses matter, as when finding out what the hardware does.' That clearly implies a single-step tool is the alternative for order-insensitive work, but no sibling is named and no explicit when-not is stated.

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