Skip to main content
Glama

pio_coredump

Retrieve the ESP32 core dump from flash after a crash and optionally analyze it to show the crashed task, reason, registers, and backtrace.

Instructions

Pull the ESP32 core dump out of the coredump flash partition after a crash (esptool read_flash) and save it. When the optional esp-coredump analyzer is installed (platformio.mcp[coredump]), it runs esp-coredump info_corefile against the env's firmware.elf with the toolchain's gdb and returns the crashed task, reason, registers, and backtrace. Reports clearly when the partition is erased (no crash recorded) or the analyzer is missing. Stop monitor sessions on the port first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNo
portNo
analyzeNo
out_pathNo
project_dirNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description provides significant transparency: it explains the analyzer dependency, the fallback behavior (erased partition, missing analyzer), and the prerequisite to stop monitors. It also implies the need for gdb and firmware.elf, which is valuable context beyond the schema.

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 a single block, but it is information-dense and front-loads the primary function. It adds the analyzer behavior and error cases, which is necessary but could be slightly streamlined. No redundancy, and each sentence contributes to understanding.

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 tool's complexity (flash reading, optional analysis, error states) and output schema, the description covers the key steps and edge cases. It doesn't specify return format, but the output schema likely handles that. It covers prerequisites and failure modes, making it adequate for an agent to execute correctly.

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 description coverage is 0%, so the description must compensate for parameter documentation. It mentions the analyzer and firmware.elf, which relates to the 'analyze' parameter, and the port is referenced via the monitor session. However, it doesn't detail 'env', 'out_path', or 'project_dir' semantics, leaving some gaps. Still, it provides enough to infer usage.

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 extracts a core dump from a flash partition, with a specific verb (pull) and resource (coredump flash partition). It details both the base operation and optional analysis, and distinguishes it from siblings like pio_decode_backtrace and pio_monitor_read by mentioning crash context and analyzer usage.

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?

The description gives clear context on when to use (after a crash), and includes a critical prerequisite: stopping monitor sessions on the port first. While it doesn't explicitly name alternatives, it differentiates itself by focusing on core dump extraction vs. decoding backtraces, which is implied by the steps.

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