Pcb Export
pcb_exportExports Gerber, drill, position, PDF or SVG files from a KiCad .kicad_pcb copy via kicad-cli, producing fabricator-ready ZIPs and hashed artifacts.
Instructions
Export from a copy of a .kicad_pcb with kicad-cli (user-installed). export is one of 'gerbers' (one file per layer, the job file and the Excellon drill file, all named after the board, plus -gerbers.zip holding all of them: one upload for a fabricator), 'drill' (Excellon, mm), 'pos' (CSV of footprint positions, mm, y pointing UP, both sides), 'pdf' or 'svg' (the board fills the page: svg is cropped to the board outline, pdf autoscaled; the chosen layers on top of each other, or one file per layer with per_layer=true, Edge.Cuts on each). layers is a comma-separated list of the board's layer names, e.g. 'F.Cu,Edge.Cuts' (names are checked against the board's own layer table; empty = all copper layers and Edge.Cuts, or for gerbers every copper, mask, silk, paste and Edge.Cuts layer). Returns file_count, and data.files with name, bytes and sha256 of every file; the files are artifacts. No 3D, STEP, VRML or PNG export, and nothing is edited. 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": {
"board_path": "<board_path>",
"export": "<export>"
},
"name": "pcb_export"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| export | Yes | 'gerbers', 'drill', 'pos', 'pdf' or 'svg' | |
| layers | No | Comma-separated layer names of this board for gerbers, pdf and svg, e.g. 'F.Cu,B.Cu,Edge.Cuts'; empty = default set | |
| per_layer | No | pdf and svg: one file per layer (Edge.Cuts drawn on each) instead of all layers overlaid on one page | |
| board_path | Yes | Path to a .kicad_pcb file, at most 50 MB |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | Non-quantity payload (reports, listings) | |
| error | No | ||
| value | No | Primary quantity result | |
| values | No | All named quantity results (includes the primary) | |
| warnings | No | ||
| artifacts | No | ||
| provenance | Yes | What produced the result and from which inputs. | |
| review_status | No | unreviewed |