Skip to main content
Glama

pio_decode_backtrace

Convert crash dumps into source locations. Supply ESP32 or Cortex-M backtrace text to resolve addresses with addr2line, returning function, file, line, crash cause, and reset reason.

Instructions

Turn a crash dump into source locations. Give text containing an ESP32/ESP-IDF 'Guru Meditation' register dump and 'Backtrace: 0x...:0x...' line, or a Cortex-M HardFault pc/lr dump, or give session_id of an open monitor session to scan its buffer. Resolves every program-counter address with the toolchain's addr2line against the env's firmware.elf and returns function, file, line (with inlined frames) per address, plus the crash cause and reset reason. The ELF must be from the same build that was flashed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNo
textNo
session_idNo
project_dirNo
include_all_hexNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries full responsibility. It discloses the core behavior: resolves addresses via addr2line against firmware.elf, returns function/file/line with inlined frames, plus crash cause and reset reason. It also notes the ELF build-matching requirement, a key operational constraint. No side effects or contradictions are present.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tightly packed sentences: purpose first, then input modes, then output details and a single prerequisite. No filler, front-loaded and efficient.

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?

Given the output schema exists (so return values are covered) and the tool's complexity, the description covers inputs, outputs, and a key constraint. It could mention error behavior on ELF mismatch or how to obtain a session_id, but these are minor gaps.

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?

Schema coverage is 0%, so the description must compensate. It explicitly documents 'text' and 'session_id', and indirectly 'env' via 'the env's firmware.elf'. However, 'project_dir' and 'include_all_hex' are left unexplained, leaving two of five parameters undocumented.

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?

States a specific verb-resource pair ('Turn a crash dump into source locations') and enumerates the exact input formats (Guru Meditation, HardFault) plus the session_id alternative. It clearly distinguishes itself from all sibling tools, which are build/monitor/target utilities, by focusing solely on backtrace decoding.

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?

Provides explicit guidance on input selection: give text for crash dumps or session_id for scanning a monitor buffer. It also states a critical prerequisite (ELF must match the flashed build). However, it does not explicitly say when to avoid using it or contrast with alternatives, though no close sibling exists.

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