Skip to main content
Glama

chip_info

Retrieves target MCU identity and memory data (Device ID, revision, Flash size, UID, read protection) via non-intrusive or full-access modes.

Instructions

读目标芯片的身份与存储信息(型号 / Device ID / 修订 / Flash 容量 / UID / 读保护)。

mode="read"(默认)走 hotplug:不复位、不停内核,板子照跑。 能拿到 型号 / Device ID / Revision / Device CPU / Board / 电压 / 调试器信息, 以及 DBGMCU_IDCODE 里更精确的 DEV_ID 与 REV_ID(会和连接 banner 交叉核对)。 mode="full" 走 normal:多拿 真实 Flash 容量 / 96 位 UID / 选项字节(读保护等)。 代价是连接本身会复位一次目标并 halt 内核 —— 受隔离层管辖(需要写权限)。 ★ 如果你正在查复位原因,别先调它:这次复位会把 PINRSTF 打进 RCC_RSR,污染现场。

实测依据:system memory(UID @0x08FFF800 / FlashSize @0x08FFF80C)在 hotplug 下 读不到(CLI 报 "failed to read the requested memory content"),必须 normal 档; 而 normal 档连上就复位。所以拆成两档,把选择权交给你,不悄悄替你做主。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
snNo
modeNoread

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so richly: read mode does not reset or halt the core, full mode resets the target once and halts the kernel, requires write permission (需要写权限), and has the side effect of polluting RCC_RSR. It even explains the empirical reason the two modes were split.

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?

Purpose and the two modes are front-loaded and the reset warning is prominent. It is somewhat long, with an empirical-rationale paragraph, but the content is load-bearing rather than redundant.

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

Completeness5/5

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

For a tool with no annotations and real side effects, the description supplies the safety profile, mode tradeoffs, and prerequisites; an output schema exists so return values need no explanation. Nothing essential is missing.

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 coverage is 0%, so the description must compensate. It fully explains the mode parameter's semantics (read vs full), but the sn parameter is never mentioned anywhere, leaving half the parameters undocumented.

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?

States a specific verb (读) and resource (目标芯片的身份与存储信息) and enumerates exactly what is returned: 型号 / Device ID / 修订 / Flash 容量 / UID / 读保护. This is clearly distinguishable from siblings like reset_reason or decode_register.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly splits usage by mode: read (default, no reset) vs full (extra data at the cost of a reset+halt), and adds an exclusion — do not call it first when investigating reset cause because it pollutes PINRSTF in RCC_RSR. Full when/when-not/alternative coverage.

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