Skip to main content
Glama

self_check

Validates STM32 debug links by reading CPUID and DBGMCU IDCODE, checking byte order, Cortex-M presence, and expected MCU family. Run first to catch endianness or config faults before debugging.

Instructions

Validates the link right after connecting: reads CPUID and DBGMCU IDCODE and checks byte order, that a real Cortex-M is present, and that the device matches the expected family (from the profile MCU or the 'expected_family' arg). Run this first to catch endianness/config faults before debugging. Halts the core first (identity reads are unreliable while running); pass halt=false to skip.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
haltNoHalt the core before reading (default true).
sessionNoOptional debug-session name. Omit for the default target.
expected_familyNoExpected MCU/family, e.g. 'STM32L431'. Defaults to the profile MCU.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only carry generic safety hints, yet the description discloses concrete behavior: it halts the core first and explains why (identity reads are unreliable while running), plus the halt=false escape hatch. This is meaningful state-mutating context that explains the readOnlyHint=false flag; only the failure/return behavior is left unstated.

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?

Front-loads the purpose, then the run-first guidance, then the halt caveat in a logical order with no filler. The single dense paragraph is slightly heavy but every clause carries 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?

With no output schema, the description still covers what is validated and the core-halting side effect, which is sufficient to call it correctly. It does not describe what a failure report looks like, a minor gap for a diagnostic tool.

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?

Schema description coverage is 100%, so both the halt default and the expected_family/profile-MCU default are already documented. The description largely restates these ("from the profile MCU or the 'expected_family' arg", "pass halt=false"), adding little beyond the schema; baseline 3 applies.

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?

Names a specific verb (validates) and precisely enumerates what is checked: CPUID, DBGMCU IDCODE, byte order, Cortex-M presence, and family match. An agent can immediately distinguish this identity/link sanity check from siblings like diagnose_fault, session_diagnostics, or validate_board.

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?

"Run this first to catch endianness/config faults before debugging" gives explicit ordering and intent. It stops short of naming a competing sibling or stating when NOT to use it, but the context for invocation is unambiguous.

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