Skip to main content
Glama
phryniszak

stm32-stlink-mcp

by phryniszak

Connect a debug session

debug_connect

Start an STM32 debug session in one step: load the ELF file, spawn the GDB server, and connect to the ST-LINK target.

Instructions

Starts a debug session: spawns ST-LINK_gdbserver and arm-none-eabi-gdb (MI2), loads ELF symbols, and connects via target extended-remote.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apIdNoAccess port ID, for multi-core devices (default: 0)
deviceNoMCU device, e.g. STM32G431CBTx (default: STM32G431CBTx)
serialNoST-LINK serial number; omit to auto-select if exactly one probe is attached
elfPathYesPath to the .elf file with debug symbols to load
interfaceNodefault: swd
frequencyKhzNoSWD/JTAG frequency in kHz (default: 4000)
haltOnConnectNoKeep the core halted after connecting (default: true)
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by revealing that it spawns external processes (ST-LINK_gdbserver and gdb), loads ELF symbols, and uses MI2/target extended-remote. However, it does not disclose side effects like whether an existing session must be absent, whether it blocks, or how cleanup works.

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, information-dense sentence that front-loads the primary purpose and then gives concrete technical steps. Every clause adds value and there is no redundant wording.

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

Completeness3/5

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

The tool is moderately complex with 7 parameters and no output schema, and the description covers the main launch actions but omits return behavior, failure conditions, and session-lifecycle expectations. It is sufficient as a starting point, but the agent would benefit from knowing what indicates success and whether an existing session must be disconnected first.

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 the parameters are already fully documented. The description adds only indirect meaning by mentioning that ELF symbols are loaded, which relates to elfPath, but it does not add semantic detail beyond what the schema already provides for apId, serial, interface, or other 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 uses a specific verb ('Starts a debug session') and identifies the exact resource and actions: spawning ST-LINK_gdbserver and arm-none-eabi-gdb, loading ELF symbols, and connecting via target extended-remote. This clearly distinguishes it from siblings like debug_disconnect, debug_run, and debug_session_status.

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 implies when to use the tool ('Starts a debug session') but does not explicitly state when not to use it or name alternatives. It does not mention prerequisites such as probe detection or that this is the entry point before other session tools, so usage context is only implied.

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