Skip to main content
Glama
agent-mcu MCP server
by linxi27667

mcu_clock_check

Read STM32 RCC and FLASH_ACR registers to verify real SYSCLK/HCLK/PCLK1/PCLK2 MHz and Flash wait states, with optional expected-SYSCLK comparison.

Instructions

Read STM32 RCC & FLASH_ACR registers to verify real SYSCLK/HCLK/PCLK1/PCLK2 MHz and Flash wait states.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "family": "<family>"
    },
    "name": "mcu_clock_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceNo
familyYes
backendNojlink
hse_mhzNo
mock_jsonNo
usb_serialNo
expect_sysclk_mhzNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are supplied, so the description must carry the full behavioral burden. It implies a read-only register probe, but says nothing about hardware connection requirements (jlink vs gdb vs mock backends), possible failures when the target is unpowered, or what the result contains when expected values do not match.

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 dense sentence with the verb and register targets front-loaded and no filler. It is efficient, though the register acronyms are unexplained and pack a lot of jargon into one clause.

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

Completeness2/5

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

With 7 parameters, no annotations, no output schema, and no return-value documentation, the definition is too thin for its complexity. An agent cannot tell which parameters are required to actually reach hardware or how the expected-vs-actual comparison is reported.

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

Parameters1/5

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

Schema description coverage is 0% across 7 parameters, so the description must compensate and it does not. Family, device, backend, hse_mhz, usb_serial, mock_json, and expect_sysclk_mhz are never mentioned, leaving the agent with no explanation of the reference clock input or the comparison parameter.

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 names a specific verb ('Read') and specific resources (STM32 RCC & FLASH_ACR registers) and states the derived outputs (SYSCLK/HCLK/PCLK1/PCLK2 MHz and Flash wait states). It is clear what the tool does, but it does not distinguish itself from siblings such as mcu_arch_check or mcu_detect_env, which also probe device state.

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 only implied: an agent can infer this is for verifying actual clock tree configuration rather than intended configuration. There is no explicit when-to-use, when-not-to-use, or named alternative such as mcu_detect_env for environment discovery.

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