Skip to main content
Glama
agent-mcu MCP server
by linxi27667

mcu_fault_decode

Decodes ARM Cortex-M HardFault, BusFault, MemManage, and UsageFault registers with PSP/MSP stacked frames and optional ELF line symbols to pinpoint the faulting instruction.

Instructions

Decode ARM Cortex-M HardFault/BusFault/MemManage/UsageFault registers, PSP/MSP stacked frame, and optional ELF line symbols.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "mcu_fault_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
elfNo
deviceNo
backendNojlink
mock_jsonNo
usb_serialNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description must carry the full behavioral burden, and it does not. It does not say whether the tool attaches to and halts a live target, whether it is read-only or mutates device state, what hardware or session the jlink/gdb backends require, or what a "mock" run means. Only the optionality of ELF symbolication is disclosed.

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?

A single front-loaded sentence that names the operation and its inputs with no filler or repetition. Every clause, including the explicit "optional" qualifier, is informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Five parameters with zero descriptions, zero annotations, and no output schema is a demanding definition, and this description explains almost none of it. It does not say what a decode returns, how faults are selected, or how the backends and mock path are configured. An agent could not use this correctly without guesswork.

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% across five parameters, so the description must compensate, and it covers only elf. device, backend (enum jlink/gdb/mock with a default), mock_json, and usb_serial receive no explanation anywhere; an agent cannot tell from this text what mock_json should contain or when usb_serial is needed instead of device. This is a substantial gap beyond the schema-provided enum values.

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 leads with a specific verb, "Decode," and enumerates concrete resources: HardFault/BusFault/MemManage/UsageFault registers, the PSP/MSP stacked frame, and ELF line symbols. That is far more specific than sibling names like mcu_arch_check or mcu_svd_query, letting an agent recognize this as the crash/fault triage tool. It stops short of an explicit contrast with any sibling, so a 4 rather than a 5.

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 phrase "optional ELF line symbols" implies that symbolication is a bonus rather than a requirement and hints at a use case of diagnosing a fault dump. Beyond that, there is no statement of when to choose this over mcu_svd_query or mcu_arch_check, no prerequisites or backend prerequisites, and no exclusion of a scenario. This leaves the expected usage to be inferred.

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