Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Pcb Export

pcb_export

Exports 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

NameRequiredDescriptionDefault
exportYes'gerbers', 'drill', 'pos', 'pdf' or 'svg'
layersNoComma-separated layer names of this board for gerbers, pdf and svg, e.g. 'F.Cu,B.Cu,Edge.Cuts'; empty = default set
per_layerNopdf and svg: one file per layer (Edge.Cuts drawn on each) instead of all layers overlaid on one page
board_pathYesPath to a .kicad_pcb file, at most 50 MB

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.9/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full behavioral burden and does so well: it discloses the kicad-cli dependency, that export runs from a copy, that source files are not edited, and that generated files are artifacts. It also describes the returned file metadata and unsupported output formats.

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 front-loaded with the core action and contains almost no filler, but it is a very dense single block rather than clearly structured sections. Some return-value detail is redundant because an output schema exists, though the overall density is justified by the tool's complexity.

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?

Given an output schema and 100% parameter description coverage, the description provides more than enough context: prerequisites, export modes, layer behavior, artifact output, and explicit exclusions. Nothing critical for correct invocation appears to be missing.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds substantial meaning beyond it: it explains exactly what each export mode produces, the naming and zip behavior for gerbers, coordinate orientation for pos, page scaling for pdf/svg, and the exact semantics of layers and per_layer. This is far above the baseline for fully documented parameters.

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 and resource: export from a copy of a .kicad_pcb using kicad-cli. It enumerates all supported export modes and explicitly excludes 3D, STEP, VRML and PNG, so an agent can identify the tool's scope immediately.

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

Usage Guidelines5/5

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

Explains when each export mode is appropriate, e.g. gerbers as 'one upload for a fabricator', drill as Excellon mm, pos as footprint positions, and pdf/svg for rendered board views. It also names unsupported formats and states that nothing is edited, leaving little ambiguity about when to call it.

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