Skip to main content
Glama
ShamanAndrey

kicad-mcp-layer

by ShamanAndrey

export_fab

Idempotent

Generate Gerber, drill, and pick-and-place files from a KiCad board using kicad-cli, and list written outputs with sizes and hashes. Requires a saved .kicad_pcb file.

Instructions

Produce fabrication files with kicad-cli and list exactly what was written, with sizes and hashes. Reads the board file on disk: save in KiCad first if it has unsaved changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdfNoMulti-page PDF of copper, silkscreen and edge layers.
stepNoSTEP 3D model; slow, needs resolvable 3D models.
drillNo
layersNoGerber layers, e.g. F.Cu,B.Cu,Edge.Cuts; default is the board's plot settings.
gerbersNo
positionNoPick-and-place CSV in mm, both sides.
board_pathYesA .kicad_pcb file, absolute or relative to the workspace.
output_dirNoOutput directory; default 'fab' next to the board.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNo
skippedNo
commandsNo
warningsNo
duration_sYes
output_dirYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, so the write profile is partly covered. The description adds value beyond that: it explains that it writes to disk and enumerates outputs with sizes and hashes, and flags the staleness trap of unsaved in-editor changes. It stops short of covering concurrency or overwrite behavior for existing output files.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero filler, with the core action front-loaded and the caveat placed second. Nothing restates the name or the schema.

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?

With an output schema present, return values need not be spelled out, and the disk-write plus save-first caveat covers the main operational risk. It is nearly complete for an 8-parameter export tool; a note on where files land or overwrite behavior would close the remaining gap.

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 description coverage is 75% and the schema already documents formats, layer selection, and output directory defaults. The description itself adds no parameter-level meaning (e.g., it never mentions board_path, output_dir, or how layers interact with gerbers), so the baseline 3 applies.

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?

States a concrete verb and resource ('Produce fabrication files with kicad-cli') plus the observable outcome (listing files with sizes and hashes). It is clear what the tool does, though it never names a sibling like export_bom or render_board, so the boundary against those adjacent export tools is left implicit.

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?

Provides one important prerequisite ('Reads the board file on disk: save in KiCad first if it has unsaved changes'), which is real usage guidance. However, it gives no when-to-use/when-not-to-use framing or routing toward alternative export tools, so guidance is implied rather than explicit.

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