Skip to main content
Glama

pin_check

Validate MCU pin assignments against datasheet alternate-function maps to catch conflicts, duplicate functions, SWD misuse, remap mismatches, and voltage-tolerance issues before coding.

Instructions

检查 MCU 引脚分配是否冲突(内置数据手册级复用映射)。 mcu 如 "stm32f103c8t6";pins 如 {"PA9": "USART1_TX", "PB6": "I2C1_SCL", "PA0": "GPIO"}。 board 可选开发板名(如 "bluepill"):板载外设占用的引脚再挪用会警告。 能抓:该脚没有此功能(AI 幻觉接线)、同一功能双占、SWD 脚挪用、 remap 档不匹配、非 5V 容忍脚;ESP32 类查硬约束(flash 保留脚/仅输入/strapping)。 写代码分配引脚之前必须先过一遍。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mcuYes
pinsYes
boardNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/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 well: it enumerates the classes of problems detected (nonexistent pin function / hallucinated wiring, double-occupied functions, SWD repurposing, remap-bank mismatch, non-5V-tolerant pins, ESP32 hard constraints like flash-reserved/input-only/strapping) and the warning behavior for reusing board-occupied pins. An output schema exists, so return values need not be described. No performance or error behavior is disclosed.

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?

Front-loaded with purpose, then worked examples, then optional-parameter behavior, then the detection list, then the usage mandate. Dense but every sentence adds information; slightly long, though none of it is filler.

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 moderate-complexity validation tool with an output schema, the description covers purpose, all three parameter formats, detection scope, and the precondition for use. Little an agent needs to invoke it correctly is missing; only alternative-routing and error behavior are absent.

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 coverage is 0% and the nested pins object has no per-key documentation, so the description must compensate — and it does, giving the exact expected format for each parameter: mcu as "stm32f103c8t6", pins as {"PA9": "USART1_TX", ...} (pin→AF-function map), and board as an optional name like "bluepill".

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+resource: checks whether MCU pin assignments conflict, with a parenthetical scoping the knowledge source (built-in datasheet-level AF mapping). This clearly distinguishes it from lookup siblings pinmap_list/pinmap_get, which merely retrieve mappings.

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?

Explicitly prescribes when to use it: '写代码分配引脚之前必须先过一遍' (must run before writing pin-assignment code). It also notes board is optional and why to supply it (onboard-peripheral occupancy triggers warnings). It does not name sibling alternatives or state when-not-to-use, so it stops short of a 5.

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