analyze_zigbee_thread_log
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/genTimefloods.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
| Name | Required | Description | Default |
|---|---|---|---|
| log_text | Yes | 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'`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| matches | Yes | ||
| release | Yes | ||
| summary | No | ||
| truncated | Yes | ||
| marketing_url | Yes | ||
| matched_count | Yes | ||
| primary_fix_url | No | ||
| zeroStackDiagUrl | No | ||
| primary_diagnosis | No | ||
| total_input_lines | Yes | ||
| primary_root_cause | No | ||
| zerostack_repository | Yes | ||
| interactive_web_analyzer_url | Yes |