Skip to main content
Glama
ESP32 DevOps MCP Server
by JosephR26

esp32_i2c_scan

Scan and classify ESP32 I2C bus addresses, detect responding, unstable, or conflicting devices, and optionally fingerprint responders with safe read-only checks.

Instructions

STAGE 3-5 (BUS DISCOVERY, DEVICE DETECTION, FINGERPRINTING). Comprehensive I2C scan. Returns every responding address in hex and decimal, ACK result, response timing, scan duration, errors and bus errors. Distinguishes RESPONDS / NO_RESPONSE / BUS_ERROR / UNSTABLE / ADDRESS_CONFLICT / RESERVED_SKIPPED. Optionally performs a safe fingerprint (a plain read, no command bytes) on each responder. Address-based profile matches are returned as LOW-confidence hints only — an I2C address never identifies a device.

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_i2c_scan"
  }
}

Input Schema

NameRequiredDescriptionDefault
sclNoSCL GPIO (optional, uses the board default)
sdaNoSDA GPIO (optional, uses the board default)
portNoSerial port (optional)
repeatsNoProbes per address, 1-8. More repeats detect unstable devices (default: 3)
timeoutMsNoRequest timeout in ms (optional)
controllerNoI2C controller index (default: 0)
endAddressNoLast address to probe (default: 119)
fingerprintNoPerform a safe read-only fingerprint of each responder (default: true)
frequencyHzNoBus frequency in Hz, 1000-1000000 (default: 100000)
startAddressNoFirst address to probe (default: 8)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.1/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 enumerates the six result classifications (RESPONDS / NO_RESPONSE / BUS_ERROR / UNSTABLE / ADDRESS_CONFLICT / RESERVED_SKIPPED) and qualifies the fingerprint as 'a plain read, no command bytes'. It does not say whether the fingerprint read could disturb a device or whether the scan has any bus-side effects.

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?

It is dense but front-loaded: purpose, return contents, classification taxonomy, optional fingerprint, then the confidence caveat. The capitalized stage prefix is somewhat noisy, but every other sentence contributes information an agent needs.

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 10-parameter, no-annotation, no-output-schema tool, the description compensates by describing the return contents (addresses in hex/decimal, ACK, timing, duration, errors) rather than leaving the agent blind. The main residual gap is guidance on parameter tradeoffs like address range and repeat count.

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 the baseline is 3, but the description adds meaning the schema does not: the fingerprint parameter is characterized behaviorally as a safe read-only operation with no command bytes, and the UNSTABLE classification explains why repeats exist. It adds no guidance on choosing address ranges or frequency.

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?

The description opens with a specific verb+resource ('Comprehensive I2C scan') and situates it in a workflow stage (BUS DISCOVERY, DEVICE DETECTION, FINGERPRINTING). Naming I2C explicitly distinguishes it from the SPI/UART/interface discovery siblings without the agent needing to open a schema.

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?

The stage labels imply when in a workflow to run the scan, and the closing sentence warns that address-based profile matches are only LOW-confidence hints. However, it never states when NOT to use it or points to an alternative such as esp32_interface_discovery or esp32_component_probe for narrower probing.

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