Skip to main content
Glama
ESP32 DevOps MCP Server
by JosephR26

esp32_register_inspect

Reads raw device registers, decodes them into named bitfields when a component profile is supplied, and performs explicit register writes with recorded before/after state for hardware verification.

Instructions

Register inspection and controlled register writing. Reads are the default and need NO component profile: name numeric registers and get raw values back. Supply a component and the same values are decoded into named bitfields with reset-value comparison — a profile is a decoder, not a permission. Registers a profile does not describe are still read, raw. WRITES: supply writes to perform explicit register writes as experiments — entering a mode, selecting a bank, triggering a measurement, clearing status, or testing undocumented behaviour. Each write records the bytes sent, the bus acknowledgement, the value read immediately before, and (unless disabled) the state read back afterwards. A bus ACK confirms the device accepted the bytes; it does NOT establish that the device did what you intended — read back and compare.

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

Input Schema

NameRequiredDescriptionDefault
csNoChip-select GPIO (SPI, required for SPI)
sclNoSCL GPIO (I2C)
sdaNoSDA GPIO (I2C)
misoNoMISO GPIO (SPI)
modeNoSPI mode 0-3
mosiNoMOSI GPIO (SPI)
portNoSerial port (optional)
sclkNoSCLK GPIO (SPI)
writesNoExplicit register writes to perform. Each is executed as requested and recorded with before/after state.
addressNoI2C address (optional, uses the profile default)
clockHzNoSPI clock in Hz
componentNoComponent profile id, part number or alias
interfaceNoInterface to read over (default: I2C)I2C
registersNoRegister names (needs a profile) or numeric addresses (needs nothing). Omit to read every register the profile declares.
timeoutMsNoRequest timeout in ms (optional)
frequencyHzNoI2C frequency in Hz
readBackAfterWriteNoRe-read the written registers afterwards (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so well: it discloses what each write records (bytes sent, bus ACK, prior value, optional read-back), that read-back can be disabled via `readBackAfterWrite`, and explicitly warns that an ACK does not prove intended device behavior. That is exactly the mutation-risk context an agent needs.

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 read/write split, then the write-recording contract. Mostly tight, though the emphatic phrasing ('a profile is a decoder, not a permission', 'does NOT establish') adds rhetorical weight that could be trimmed. No sentence is genuinely wasted.

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 17-parameter, zero-required, no-output-schema tool, the description supplies the read-vs-write mental model and the write verification loop. It defers interface/pin/clock specifics to the fully documented schema, which is reasonable, though it doesn't hint at what a read result looks like or whether omitted parameters fall back to profile defaults.

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 100%, so baseline is 3, but the description adds real meaning beyond the schema: `component` is framed as a decoder rather than a permission gate, and `registers` is clarified as names-with-profile vs raw numeric addresses. It reinforces the write-recording semantics of `writes` without restating field-level syntax.

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?

Opens with a specific verb pair and resource: 'Register inspection and controlled register writing.' It immediately delineates the two modes (raw reads by default, decoded reads with a `component`, explicit writes via `writes`), so an agent knows exactly what the tool does and which mode it would be invoking.

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 clear in-tool guidance: reads are the default and need no profile, supplying `component` only adds decoding, and `writes` is for experiments like entering a mode or triggering a measurement. It does not name or exclude sibling tools (e.g., esp32_hardware_experiment, esp32_i2c_scan), leaving cross-tool selection partly to inference.

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