Skip to main content
Glama
phryniszak

stm32-stlink-mcp

by phryniszak

Read Cortex-M fault registers

read_fault_registers

Capture a full dump of Cortex-M fault registers and decode CFSR/HFSR bits into flag names, along with PC/SP/LR, to pinpoint the cause of an STM32 crash. Provides raw fault evidence for debugging.

Instructions

One-call dump of Cortex-M SCB fault registers (CFSR/HFSR/MMFAR/BFAR/SHCSR/CPUID/ICSR) plus PC/SP/LR, with CFSR/HFSR bits decoded to flag names. Raw evidence only — no root-cause interpretation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYes
Behavior4/5

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

With no annotations, the description carries the transparency burden and does a solid job: it discloses the output contents (CFSR/HFSR/etc., decoded bit flags, raw evidence) and explicitly states 'no root-cause interpretation,' setting expectations about scope. It does not address side effects or session requirements, but as a read/dump operation this is reasonably transparent.

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 a single front-loaded sentence that packs the register list, decoding behavior, and output philosophy without filler. Every phrase contributes information.

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 only one parameter and no output schema, the description adequately covers the tool's purpose and return scope by enumerating registers and noting decoded flags. It falls short only on explicitly connecting the tool to a debug session and on usage guidance, which are handled in other dimensions.

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%, and the description does not mention sessionId at all. Although sessionId is a single self-descriptive parameter, the description fails to clarify that it refers to the target debug session, which is important given the sibling debug_connect/debug_session_status tools.

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 specifies the action ('one-call dump'), the resource ('Cortex-M SCB fault registers'), and the exact register set plus PC/SP/LR. It differentiates from sibling register_read by presenting a combined, pre-decoded fault-register dump rather than a generic single-register read.

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?

Usage is implied: this tool is for obtaining a complete fault-register snapshot in one call. However, it does not explicitly state when to prefer this over register_read, nor does it mention prerequisites like needing an active halt or debug session.

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/phryniszak/stmcp'

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