Skip to main content
Glama
cunjun
by cunjun

backtrace

Reconstruct the call stack of a halted Cortex-M MCU by scanning stack memory and resolving addresses to ELF symbols, aiding fault diagnosis.

Instructions

Heuristic call stack reconstruction for Cortex-M targets.

Frame 0 is the current PC. Frame 1 is LR (return address). Further frames are found by scanning the stack for addresses that resolve to known function symbols in the loaded ELF. Accuracy depends on compiler optimizations; best with -O0 or -O1. Requires probe connected and target halted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_framesNo
stack_scan_wordsNo
Behavior4/5

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

With no annotations, the description discloses the core algorithm: Frame 0 is PC, Frame 1 is LR, further frames via stack scanning, and accuracy depends on compiler optimizations. It also states prerequisites (probe connected, target halted), providing valuable behavioral 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.

Conciseness5/5

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

The description is five sentences, each adding essential information: purpose, frame interpretation, scanning mechanism, limitations, and requirements. No redundancy, well-structured and front-loaded.

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?

The description is fairly complete for a diagnostic tool: it explains the output structure (frames), the method, limitations, and prerequisites. It could explicitly state the return format, but the frame description implies a list of addresses/symbols, which is adequate given no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet the description does not explicitly explain the parameters 'max_frames' or 'stack_scan_words'. It only indirectly references scanning via 'scanning the stack', which partially relates to stack_scan_words, but lacks concrete semantics for these parameters.

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 performs 'Heuristic call stack reconstruction for Cortex-M targets', specifying the action, resource, and target. It distinguishes itself by the heuristic scanning approach, which is unique among sibling tools.

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

Usage Guidelines3/5

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

The description provides context on when it can be used ('Requires probe connected and target halted') but does not explicitly compare with alternatives or state when not to use it. It implies usage for stack reconstruction but lacks exclusions.

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/cunjun/McuBuddy'

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