Skip to main content
Glama
microhenrio

io.github.microhenrio/openocd-mcp

by microhenrio

watch_variables

Sample variables repeatedly without halting the CPU, returning a time-series table for live monitoring of RAM globals and statics.

Instructions

Live-watch one or more variables WITHOUT halting the CPU: sample them repeatedly while the target runs and return a time-series table.

names : comma- or space-separated variable names (requires load_elf). samples : number of snapshots, 1-200. interval_ms : delay between snapshots in milliseconds.

Works for RAM globals/statics (read live via background memory access). CPU registers need a halt and aren't supported here. Multi-word values are read non-atomically, so a >4-byte value may be momentarily inconsistent.

This tool is one-shot and returns a flat text table. For an open-ended, auto-refreshing GUI window with expandable structs/arrays, there is a separate standalone program called openocd-watch. It is NOT reachable through this MCP server as a tool call — but it is an ordinary console script, so an assistant with its own shell/process-launch capability (e.g. a coding agent with a terminal tool) MAY run it directly as a background process for the user, same as it would run any other CLI program. An assistant limited to this server's MCP tools cannot reach it and should tell the user to run it themselves instead. Invocation: openocd-watch --elf <path/to/firmware.elf> Add --autostart if OpenOCD isn't already running.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namesYes
samplesNo
interval_msNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: non-halting operation, supported variable types, non-atomic multi-word reads, and one-shot nature. It states limitations and what the tool cannot do (registers, atomic >4-byte values). This is comprehensive.

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 description is well-structured: core purpose first, then parameters, limitations, and alternatives. It is slightly lengthy due to the detailed openocd-watch explanation, but every sentence adds value and does not waste space. A minor trim could improve conciseness.

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 tool with 3 parameters (1 required), no annotations, and an output schema (indicated true), the description covers all necessary aspects: purpose, parameter details, behavior, limitations, and output format. It even references prerequisites like load_elf. The agent has sufficient information to decide and use the tool correctly.

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?

Although the input schema itself provides no parameter descriptions (0% coverage), the tool description explains each parameter in detail: names format and prerequisite, samples range, interval_ms unit. This fully compensates for the schema's lack of documentation.

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 clearly states the tool's action ('Live-watch one or more variables'), the mode ('WITHOUT halting the CPU'), and the output ('return a time-series table'). It distinguishes from sibling tools like read_variable (single read), watchpoints (halt on access), and the separate openocd-watch program (GUI vs one-shot).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly explains when to use the tool (RAM globals/statics only) and when not (CPU registers need a halt). It provides clear parameter explanations and contrasts with the standalone openocd-watch, including instructions for assistants with terminal access. No ambiguity remains.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/microhenrio/openocd-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server