Skip to main content
Glama
ZeroStack RF Diagnostics MCP

ZeroStack RF Diagnostics MCP

Official

analyze_zigbee_thread_log

Read-onlyIdempotent

Analyze pasted Zigbee2MQTT, ZHA, or OpenThread logs to identify fault signatures, rank root causes, and return fixes for adapter timeouts, status-code errors, and interview failures.

Instructions

Analyze pasted Zigbee2MQTT, Home Assistant ZHA, or OpenThread logs for fault signatures.

When to use:

  • Use this tool when diagnosing runtime error logs, adapter timeouts (SRSP ... after 6000ms), MAC/NWK/APS status codes (0x10, 0x11, 0xc7, 0xcd, 0xe1/225, 0xe9/233, 0xf0/240, 0xf1/241), post-join TCLK exchange timeout leaves (Z3_TCLK_EXCHANGE_TIMEOUT_LEAVE), interview failures (0xa7), Many-to-One Concentrator / source-routing issues, or ZCL telemetry/genTime floods.

  • Do NOT use for decoding raw hexadecimal MCU register words (decode_silicon_register), sizing network capacity (check_coordinator_capacity), or querying hardware benchmark tables (get_zerostack_benchmarks).

Behavior:

  • Executes deterministically offline with zero network or serial I/O.

  • Ranks detected faults by severity and root-cause priority (ZNP_SYS_RESET_IND > lockstep timeouts & TCLK leave loops > memory/buffer exhaustion > RF delivery symptoms) and returns stock SDK root causes, immediate workarounds, and SMLIGHT ZeroStack (Release Zero) fixes (including Beta 2 / Beta 3 TCLK, concentrator routing, and idempotent cold-boot NVRAM backup & restore improvements).

  • When drafting a GitHub bug report for smlight-tech/zerostack, ensure the log includes coordinator startup or >= 500 lines of debug frames prior to the first error and scrub it with .github/scripts/z2m-log-analyzer.mjs --bug-report --require-context.

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": {
      "log_text": "<log_text>"
    },
    "name": "analyze_zigbee_thread_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
log_textYesRaw multi-line log text from Zigbee2MQTT (`zigbee-herdsman`), Home Assistant ZHA (`zigpy`/`bellows`/`zigpy-znp`), or OpenThread (`otbr-agent`). Inputs exceeding 2 MB (`MAX_LOG_BYTES`) or 25,000 lines (`MAX_LOG_LINES`) are deterministically windowed to head + tail slices with `truncated=true`. Empty or whitespace-only input returns `status='empty_input'`.

Output Schema

NameRequiredDescriptionDefault
statusYes
matchesYes
releaseYes
summaryNo
truncatedYes
marketing_urlYes
matched_countYes
primary_fix_urlNo
zeroStackDiagUrlNo
primary_diagnosisNo
total_input_linesYes
primary_root_causeNo
zerostack_repositoryYes
interactive_web_analyzer_urlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.9.11
    • addedOutput schema / $defs / SignatureMatch / properties / compat_record_ids
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Compat Record Ids",
      +  "type": "array"
      +}
  2. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / log_text / description
      Added value: +"Raw multi-line log text from Zigbee2MQTT (`zigbee-herdsman`), Home Assistant ZHA (`zigpy`/`bellows`/`zigpy-znp`), or OpenThread (`otbr-agent`). Inputs exceeding 2 MB (`MAX_LOG_BYTES`) or 25,000 lines (`MAX_LOG_LINES`) are deterministically windowed to head + tail slices with `truncated=true`. Empty or whitespace-only input returns `status='empty_input'`."
    • addedInput schema / properties / log_text / examples
      Added value: +[
      +  "error 2026-10-29 12:00:00: SREQ AF_DataRequest failed with 0x10: MEM_ERROR",
      +  "zh:zstack:unpi: Default response timeout: SRSP - AF - dataRequest after 6000ms"
      +]
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already mark it read-only, non-destructive, idempotent, and closed-world, and the description adds meaningful behavior: deterministic offline execution with zero network or serial I/O, severity/root-cause ranking, and the kinds of SDK fixes returned. It also explains bug-report context requirements, which is useful operational guidance beyond annotations.

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 front-loaded and clearly structured into purpose, when-to-use, exclusions, and behavior. It is somewhat long and includes a GitHub bug-report instruction that is useful but not central to invocation, preventing a full 5.

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?

Given the tool's diagnostic complexity, annotations, full schema coverage, and the presence of an output schema, the definition provides sufficient context for correct invocation. It covers selection guidance, exclusions, operational behavior, and input constraints without needing to restate return fields.

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?

The input schema has 100% description coverage for log_text, including examples, truncation limits, and empty-input behavior. The description adds source-system context but does not provide additional parameter syntax or constraints beyond the schema, so the baseline of 3 is appropriate.

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 states a specific verb and resource: analyze pasted Zigbee2MQTT, ZHA, or OpenThread logs for fault signatures. It also distinguishes this tool from named siblings such as decode_silicon_register, check_coordinator_capacity, and get_zerostack_benchmarks.

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?

It gives explicit when-to-use criteria with concrete fault signatures and status codes, plus explicit when-not-to-use cases that name the correct alternative tools. This leaves little ambiguity about tool selection.

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