Skip to main content
Glama

mode_set

Enable a specific peripheral mode in an STM32CubeMX project by setting the IP instance and mode name, such as USART1 Asynchronous or TIM3 PWM Generation CH1.

Instructions

Enable a peripheral mode (set mode <IP> <mode>), e.g. USART1 Asynchronous, RCC Crystal/Ceramic Resonator, TIM3 PWM Generation CH1.

Input Schema

NameRequiredDescriptionDefault
modeYesMode name from mode_list
peripheralYesIP instance
project_idYesProject id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. 'Enable' implies mutation, but it does not say whether an existing mode configuration is overwritten, whether conflicting pin/clock assignments must be cleared first, whether mode_check is a recommended pre-flight, or whether the change persists only until project_save.

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?

A single front-loaded sentence that puts the verb first, then the CLI form, then examples that anchor what a valid mode string looks like. Nothing wasted, though it is short to the point of omitting behavioral context.

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?

For a 3-parameter mutation tool with no annotations and no output schema, the definition is minimally viable: it identifies the action and the shape of the mode value. It leaves out prerequisites and side effects, which matter for a tool that mutates project configuration alongside siblings like mode_check and mode_reset.

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 all three parameters (project_id, peripheral, mode) are already documented in the structured schema. The description adds illustrative mode values but no syntax or constraint detail beyond what the schema provides, so baseline 3 applies.

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?

States a specific verb ('Enable') plus the resource ('peripheral mode') and backs it with the underlying CLI form and three concrete examples (USART1 Asynchronous, RCC Crystal/Ceramic Resonator, TIM3 PWM Generation CH1). It is clearly distinct from mode_list/mode_check/mode_reset by virtue of being the enabling action, though it never names those siblings explicitly.

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 by the CLI syntax and the example mode strings, and the schema quietly routes the agent to mode_list for valid mode names, but the description itself contains no explicit when-to-use, when-not-to-use, or prerequisite statement (e.g. whether a project must be open/loaded first).

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

Deploy Server

Other Tools