Skip to main content
Glama

环境一致性体检(芯片 / SVD / 固件 / 符号 / D-Cache)

env_check
Read-onlyIdempotent

Verify that the project target, firmware symbols, and register tables match the real chip on the board. Detect mismatches in chip model, symbol source, and SVD selection to prevent false debugging data.

Instructions

一键核对「工程与工具以为的目标」和「板上真实的目标」是否一致——跨仓库/跨板调试最毒的两类问题都在这里设防:①符号与板上固件不同源(PC 被解析成假符号);②SVD/内置寄存器表选错芯片(读出别的芯片布局下「看着像样」的值)。 输出包含:chip(实测 DBGMCU_IDCODE + CPUID 推出的型号/系列/置信度)、configured(工程 / 内置寄存器表 / 已加载 SVD 各自的系列,以及逐项 matched/mismatched/unknown 判定)、firmware_symbol(符号与板上固件的内容指纹比对)、dcache(D-Cache 是否使能)、last_flashed(本进程最近一次烧录的工程与 .axf)、problems / next_actions。 判据一律拿目标说话:读不到 IDCODE 就说 unknown,不拿工程配置冒充实测结果;allow_mismatch 只影响「后续外设工具要不要放行」,不改变这里的判定。 guard 字段告诉你器件守卫这次到底有没有生效:active=false 表示没能实测出芯片型号(多数是目标没在调试态),此时外设级读数没有型号核对保护,请自行核对型号——别把「体检没报错」当成「一定没问题」。 链路是懒连接的:只连 UVSOCK 不会进调试/停机/下载,可以放心先跑本工具看环境。 【参数】必填: 无;可选: project, link, content_check 【调用示例】{}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linkNoauto
projectNo
content_checkNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4.1/5.0
Behavior5/5

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

It discloses important behavioral traits beyond the annotations: it reports 'unknown' when IDCODE cannot be read (not faking results), explains the guard field (active=false means no chip model verification), and warns that 'no error' does not guarantee correctness. It also clarifies that the tool is lazy-connected and won't alter debug state, complementing the readOnlyHint and idempotentHint annotations.

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 long but well-structured, front-loading the core purpose, then detailing outputs, caveats, and finally parameters. It uses paragraphs and bullet points effectively, though it could be more concise while retaining the critical edge-case information.

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 complex tool with detailed output fields and edge-case behaviors, the description is largely complete: it explains the output structure, safety, and failure modes. However, the lack of parameter explanations creates a gap for advanced usage, though the default call (empty object) is sufficient for the primary use case.

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

Parameters2/5

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

The description lists the optional parameters (project, link, content_check) but does not explain their purpose or effects. With schema description coverage at 0%, the agent receives no guidance on what these parameters control, making it hard to use them effectively beyond the default empty call.

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 explicitly states the tool checks consistency between the expected target (from project/tools) and the actual target on the board, listing specific problem types (e.g., symbol/firmware mismatch, wrong SVD chip selection) and detailed output fields. It clearly distinguishes itself from sibling diagnostic tools like get_version or keil_command by serving a unique consistency-checking role.

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

Usage Guidelines4/5

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

The description provides clear usage context (cross-repo/cross-board debugging, run first before debugging) and notes the lazy connection that safely avoids entering debug/stop/download. However, it does not explicitly mention when not to use it or compare it directly to alternative tools, leaving some inference to the agent.

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