Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Pcb Erc

pcb_erc

Runs KiCad electrical rules checks on one .kicad_sch file, returning violation counts by severity and type with item descriptions and positions.

Instructions

Run KiCad's electrical rules check (kicad-cli sch erc, user-installed) on a copy of one .kicad_sch file. Values: error_count, warning_count, violation_count. data.violations lists them by type (pin_not_connected, pin_to_pin, lib_symbol_issues ...) and severity with the description and position in mm of each item; data.rule_set says which rules were used (KiCad's defaults, or the allow-listed severities and pin map from the .kicad_pro next to the file; use_project_files=false ignores it). Only the one file is checked: sub-sheets in other files are not copied. Symbol libraries are not visible, so lib_symbol_issues warnings appear for library symbols (the copy embedded in the file is used); they are split out in data.violations.library_warnings from the real findings. Raw report is an artifact. Needs kicad-cli.

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": {
      "schematic_path": "<schematic_path>"
    },
    "name": "pcb_erc"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_violationsNoHow many violations to list (0 to 1000); the counts by type are always complete
schematic_pathYesPath to a .kicad_sch file, at most 50 MB
use_project_filesNoTrue: use the allow-listed ERC settings of <name>.kicad_pro next to the file if it exists; false: KiCad defaults only

Output Schema

NameRequiredDescriptionDefault
okYes
dataNoNon-quantity payload (reports, listings)
errorNo
valueNoPrimary quantity result
valuesNoAll named quantity results (includes the primary)
warningsNo
artifactsNo
provenanceYesWhat produced the result and from which inputs.
review_statusNounreviewed

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A4/5.0
Behavior5/5

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

There are no annotations, so the description carries the full burden and does so thoroughly: it states the external CLI dependency, the copy-based operation, the artifact output, the split between library warnings and real findings, and the fact that other files/sub-sheets are not checked. Those are exactly the behavioral constraints an agent needs before invoking it.

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 information-dense and front-loads the purpose, then moves through outputs and limitations without obvious filler. It could be easier to scan with lighter structure, but every sentence is relevant to correct use.

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 that shells out to a user-installed CLI, works on a copy, and has special handling for project files and missing libraries, the description covers the operational shape and caveats well. An output schema exists, and the description still supplies the non-schema caveats an agent needs.

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 100%, so all three parameters are already documented; the description adds some meaning around use_project_files and the rule_set outcome, but it does not explain max_violations beyond the schema. With the schema doing the parameter-level work, 3 is appropriate.

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 opening sentence names a specific operation (KiCad ERC via kicad-cli sch erc) and a specific resource (.kicad_sch), and the scope is narrowed to one file. That is clear enough to distinguish it from a PCB DRC tool in practice, but the description does not explicitly name or contrast the sibling tool, so it stops short of 5.

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?

It supplies important operating context—single-file only, sub-sheets not copied, libraries not visible, and use_project_files controls project settings—but it never says when to choose this tool over pcb_drc or another sibling. Usage is implied by the purpose rather than stated as selection guidance.

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