Skip to main content
Glama

stm32_build

Compiles STM32 CubeIDE firmware in headless mode, automatically detecting added or deleted source files so no Makefile updates are needed, and returns compiler errors, warnings, and ELF path.

Instructions

Build STM32 firmware using CubeIDE headless builder.

Compiles the project at project_path using the specified build configuration. CubeIDE headless mode automatically detects new/deleted source files - no Makefile maintenance needed.

Args: project_path: Absolute path to the CubeIDE project root (must contain .project and .cproject). configuration: Build configuration - "Debug" or "Release". clean: If true, clean before building (slower but ensures full rebuild).

Returns: Build result with filtered compiler output, errors/warnings, ELF size, and the path to the built .elf file on success.

Input Schema

NameRequiredDescriptionDefault
cleanNo
project_pathYes
configurationNoDebug

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden. It discloses useful behavior: 'clean' forces a full rebuild and is slower, and the return includes filtered compiler output, errors/warnings, ELF size, and the .elf path. It does not cover failure modes, timeouts, filesystem/build-artifact effects, or whether build output is cached between runs.

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?

The description is front-loaded with the core action and organized into Args and Returns sections, which makes it easy to scan. A few lines border on redundant with the schema, but no sentence is truly wasteful.

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 three-parameter build tool, the description covers the essential inputs and a summary of outputs, and the presence of an output schema means return values need not be exhaustively restated. The main remaining gap is the absence of usage guidance relative to stm32_build_and_flash and any environment prerequisites.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must document all three parameters. It does so clearly: project_path must be absolute and contain .project/.cproject, configuration is 'Debug' or 'Release', and clean triggers a pre-build clean. The schema defaults for clean and configuration are not restated, which is minor since they are visible in the schema.

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 states a specific verb and resource ('Build STM32 firmware using CubeIDE headless builder') and explains that it compiles the project at project_path, which is clearly identifiable. It lacks explicit differentiation from the sibling 'stm32_build_and_flash', so the agent must infer which build entry point to use.

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 this is appropriate (a build-only operation) and notes that CubeIDE headless mode detects added/deleted sources without Makefile maintenance. However, it never explicitly says to use this instead of 'stm32_build_and_flash', nor does it state preconditions such as having a configured toolchain.

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