Skip to main content
Glama

reconstruct_fault_context

Reconstructs a HardFault crash site by decoding fault registers, unwinding the stacked exception frame from MSP/PSP via EXC_RETURN, and resolving the true faulting PC to source file:line.

Instructions

Reconstructs the full crash site after a HardFault: decodes fault registers, unwinds the auto-stacked exception frame from MSP/PSP via EXC_RETURN to recover the true faulting PC, and resolves it to source file:line. Run this when halted in a fault handler.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNoOptional debug-session name. Omit for the default target.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.1

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare a non-read-only, non-idempotent, non-destructive, closed-world operation, and the description does not contradict that. It adds real behavioral context about the underlying method (MSP/PSP unwinding, EXC_RETURN handling), but it never explains why the tool is not read-only or what side effects/preconditions the non-idempotent hint implies.

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?

Two sentences, front-loaded with the core action and mechanism, and the second sentence delivers the invocation condition with zero filler. Every clause carries technical meaning about what the tool does or when to call it.

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?

For a diagnostic tool with annotations present and no output schema, the description covers what it does, why it is non-trivial, and when to invoke it. It would be fully complete with the prerequisite (e.g., symbols loaded) and a note on how it relates to the fault-diagnosis siblings, but nothing essential is missing.

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?

With a single parameter at 100% schema description coverage, the schema already fully documents 'session' (optional, default target). The description adds nothing about the parameter's meaning or format, so this sits at the baseline of 3 where structured data does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (reconstructs) and resource (the crash site after a HardFault) and details the mechanism: decoding fault registers, unwinding the auto-stacked exception frame from MSP/PSP via EXC_RETURN, and resolving to source file:line. This is far more specific than a tautology, but it never distinguishes itself from nearby siblings such as diagnose_fault, analyze_stack, or coredump, which an agent could plausibly confuse it with.

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?

It gives an explicit trigger condition: 'Run this when halted in a fault handler,' which is exactly the state-dependent cue an agent needs. However, it names no alternatives or exclusions, so an agent halted in a fault has no guidance on when to prefer diagnose_fault or analyze_stack over this tool.

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